text: class TreeNode:
      def __init__(self, x):
          self.val = x
          self.left = None
          self.right = None
  
  
  class Solution:
      def isSymmetric(self, root: TreeNode) -> bool:
          if not root:
              return True
  
          def help(left: TreeNode, right: TreeNode) -> bool:
              if not left and not right:
                  return True
              if not left or not right:
                  return False
              if left.val != right.val:
                  return False
              return help(left.right, right.left) and help(left.left, right.right)
  
          return help(root.left, root.right)
  
  