// Definition for a Node.
Node(int _val, vector<Node*> _children) {
vector<int> preorder(Node* root) {
res.push_back(root->val);
if(pt.top()->children.empty())
if(!pt.empty()) pt.top()->children.erase(pt.top()->children.begin());
pt.push(pt.top()->children[0]);
res.push_back(pt.top()->val);