```
def sumNumbers(self, root):
return self.sum_numbers_help(root, 0)
def sum_numbers_help(self, root, curr):
if not root:
return 0
curr = 10 * curr + root.val
if not root.left and not root.right:
return curr
return self.sum_numbers_help(root.left, curr) + self.sum_numbers_help(root.right, curr)
```