# class TreeNode:
#     def __init__(self, x):
#         self.val = x
#         self.left = None
#         self.right = None

#
# 
# @param root TreeNode类 
# @return int整型一维数组
#
class Solution:
    # 后序遍历指左、右、根
    def postorderTraversal(self , root ):
        # write code here
        def dfs(cur):
            if cur is None:
                return
            dfs(cur.left)
            dfs(cur.right)
            res.append(cur.val)
        res = []
        dfs(root)
        return res