python
if x is root, it cuts tree into two parts: left child, right child. Only when the two parts are same num of nodes, player 2 will never win\n- if x is not root, 
- if x is root, it cuts tree into two parts: left child, right child. Only when the two parts are same num of nodes, player 2 will never win\n- if x is not root, it cuts tree into three parts: left child, right child, parent. Only when the largest part of three are more than half of total nodes, player 2 will win.\n\n```python\n    def btreeGameWinningMove(self, root: Optional[TreeNode], n: int, x: int) -> bool:\n        def search(node):\n\t\t\'\'\'count num of nodes at or below this node\'\'\'\n            if not node:\n                return 0\n            \n            l = search(node.left)\n            r = search(node.right)\n            \n            if node.val == x:\n                self.l, self.r = l, r\n            \n            return 1 + l + r\n        \n        if x == root.val:\n            c1 = search(root.left)\n            return c1 != n // 2\n        \n        self.l, self.r = 0, 0\n        search(root)\n        return max([self.l, self.r, n - 1 - self.l - self.r]) > n //2\n        \n```
[]