class Solution:
def pruneTree(self, root: TreeNode) -> TreeNode:
if root == None:
return None
root.left = self.pruneTree(root.left)
root.right = self.pruneTree(root.right)
if root.left == None and root.right == None and root.val == 0:
return None
return root