# Definition for a binary tree node.
class TreeNode:
    def __init__(self, x):
        self.val = x
        self.left = None
        self.right = None

class Solution:
    def inorderTraversal(self, root):
        """
        :type root: TreeNode
        :rtype: List[int]
        """
        self.ans=[]
        def helper(root):
            if root.left:
                helper(root.left)
            self.ans.append(root.val)
            if root.right:
                helper(root.right)
            return
        if not root:
            return []
        else:
            helper(root)
        return self.ans
s=Solution()
root=TreeNode(1)
root.right=TreeNode(0)
root.right.left=TreeNode(0)
root.right.right=TreeNode(1)
print(s.pruneTree(root))