class TreeNode:
def __init__(self, val=0, left=None, right=None):
self.val = val
self.left = left
self.right = right
def op(root, x):
if not root:
return TreeNode(x)
if x < root.val:
root.left = op(root.left, x)
else:
root.right = op(root.right, x)
return root