python
\nclass Solution(object):\n    def btreeGameWinningMove(self, root, n, x):\n        """\n        :type root: TreeNode\n        :type n: int\n        :type x: in
```\nclass Solution(object):\n    def btreeGameWinningMove(self, root, n, x):\n        """\n        :type root: TreeNode\n        :type n: int\n        :type x: int\n        :rtype: bool\n        """\n        self.left = None\n        self.right = None\n        self.helper(root, x)\n        parent = n - 1 - self.left - self.right\n        return max(parent, max(self.left, self.right)) > n / 2\n        \n    def helper(self, root, x):\n        if not root:\n            return 0\n        l = self.helper(root.left, x)\n        r = self.helper(root.right, x)\n        if root.val == x:\n            self.left = l\n            self.right = r\n        return 1 + r + l\n```
['Python3']