# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
def TreeDepth(self , root):
if root== None:
return 0;
L= Solution.TreeDepth(self , root.left);
R = Solution.TreeDepth(self , root.right);
return max(L , R) + 1