Mr. Kuo is an adventurer. One day, he finds a sequences of operations and an empty set S.
Each operation is one of the following two types,
Mr. Kuo is curious about the answer to each operation 2, so he asks for your help.
Hint:You can refer to C++ upper_bound function.
The input consists of multiple lines.
Each line is given in one of the following two format:
There will be at most 100000 operations in the sequences.
1 ≤ x ≤ 109
1 ≤ k ≤ 5
For each operation of type 2, print the k-th smallest value among the elements of S that are greater than or equal to x.
If there are less than k elements of S that are greater than or equal to x, then print "-1".
Remember to print '\n' at the end of each line.