class Solution:
def treeDepth(self, root):
"""
:type root: TreeNode
:rtype: int
"""
if not root:
return 0
leftH=self.treeDepth(root.left)
rightH=self.treeDepth(root.right)
return max(leftH,rightH)+1