Write a program that forms a binary search tree from a given sequence of natural numbers. Each new integer must be placed at the only leaf that allows to mantain the propierty of the binary search trees. The repeated elements must be ignored.
Input
Input is a non empty sequence of natural numbers.
Output
Your program must print the resulting tree, following the same format of the instances (which is the same that the format of the exercise , but now with natural numbers).
Input
30 10 50 0 100 15 50 120 30 110
Output
120 110 100 50 30 15 10 0