Implement a binary search tree for integers. The program receives a sequence of integers and builds a tree from them. Elements are inserted into the tree according to the result of searching for their place. If an element already exists in the tree, it should not be added again. The tree is not balanced.
Print the list of all leaves in the tree (vertices without children) in increasing order.
The program receives a sequence of integers as input. The sequence ends with the number , which indicates the end of input and should not be added to the tree. It is guaranteed that the input sequence contains no more than 10^5 elements, each of which does not exceed 2 \cdot 10^9 in absolute value.
Print the list of all leaves in the tree in increasing order.
Example 1