水题
"""
# Definition for a Node.
class Node(object):
def __init__(self, val, children):
self.val = val
self.children = children
"""
class Solution(object):
def postorder(self, root):
"""
:type root: Node
:rtype: List[int]
"""
if root is None: return []
ans = []
for child in root.children:
ans += self.postorder(child)
return ans+[root.val]