input: 
  def is_subtree(T, S):
      """ Check if binary tree S is a subtree of binary tree T.
      >>> class Node:
      ...     def __init__(self, data):
      ...         self.data = data
      ...         self.left = None
      ...         self.right = None
      ... 
      >>> def areIdentical(T, S):
      ...     if T is None and S is None:
      ...         return True
      ...     if T is None or S is None:
      ...         return False
      ...     return (T.data == S.data and areIdentical(T.left, S.left) and areIdentical(T.right, S.right))
      ... 
      >>> def isSubTree(T, S):
      ...     if S is None:
      ...         return True
      ...     if T is None:
      ...         return False
      ...     if areIdentical(T, S):
      ...         return True
      ...     return isSubTree(T.left, S) or isSubTree(T.right, S)
      ... 
      >>> T = Node(26)
      >>> T.left = Node(10)
      >>> T.right = Node(3)
      >>> T.left.left = Node(4)
      >>> T.left.right = Node(6)
      >>> T.right.right = Node(3)
      >>> T.left.left.right = Node(30)
      >>> S = Node(10)
      >>> S.left = Node(4)
      >>> S.right = Node(6)
      >>> S.left.right = Node(30)
      >>> is_subtree(T, S)
      True
      >>> T = Node(26)
      >>> T.left = Node(10)
      >>> T.right = Node(3)
      >>> T.left.left = Node(4)
      >>> T.left.right = Node(6)
      >>> T.right.right = Node(3)
      >>> T.left.left.right = Node(30)
      >>> S = Node(10)
      >>> S.left = Node(4)
      >>> S.right = Node(6)
      >>> is_subtree(T, S)
      False
      """
  
output:     if S is None:
          return True
      if T is None:
          return False
      if areIdentical(T, S):
          return True
      return isSubTree(T.left, S) or isSubTree(T.right, S)