input: def isSubTree(T, S):
      """
      Given two binary trees, check if the first tree is subtree of the second tree.
      >>> isSubTree(Node(10), Node(10))
      True
      >>> isSubTree(Node(10), Node(20))
      False
      >>> isSubTree(Node(1), Node(1, Node(2), Node(3)))
      True
      """
output:     if not T:
          return True
      if not S:
          return False
      if isIdentical(T, S):
          return True
      return isSubTree(T, S.left) or isSubTree(T, S.right)
  
  def isIdentical(root1, root2):
      if not root1 and not root2:
          return True
      if not root1 or not root2:
          return False
      return (root1.val == root2.val and 
              isIdentical(root1.left, root2.left) and 
              isIdentical(root1.right, root2.right))