Write function (insert x T) that inserts key x into binary search tree T, and returns the resulting modified tree.