"""# Definition for a Node.class Node: def __init__(self, val=None, children=None): self.val = val self.children = children"""classSolution:defmaxDepth(self,root:'Node') ->int:ifnot root:return0ifnot root.children:return1return1+max([self.maxDepth(child) for child in root.children])