Binary Tree Traversal: recursion 
class Solution:
    def threeOrders(self , root ):
        # write code here
        def preorder(root):
            if not root:
                return [] 
            return [root.val]+preorder(root.left)+preorder(root.right)
        def inorder(root):
            if not root:
                return []
            return inorder(root.left)+[root.val]+inorder(root.right)
        def postorder(root):
            if not root:
                return []
            return postorder(root.left)+postorder(root.right)+[root.val]
        
        return [preorder(root),inorder(root),postorder(root)]