#00014A

Brojanje

After having a lot of fun with dividing cookies, Mirko and Slavko decided to play the following game:

Mirko will say aloud some of his favorite numbers (up to 400 numbers) and at any moment he can ask Skavo what is the k-th smallest number he has said aloud so far. By k-th smallest number we mean the k-th number when the numbers are sorted in an increasing order!

You have to help Slavko by writing a program that will answer these questions for him



InputFrom the first line of the standard input read one integer (5 <= n <= 100000). Each of the following n lines will have one of the following two formats:

- 1 a - meaning that Mirko said aloud the number a, (0 <= a <= 65535).
- 2 k - meaning that Mirko asks what is the kth smallest number he has said so far. k will always be less or equal to the number of numbers Mirko has said aloud so far.

The total number of different number will not be bigger than 400, but some of the numbers can repeat!

OutputTo the standard output write one line for each of the 2 k inputs. Representing the kth smallest number at that moment.


Input:
7
1 0
1 1
1 5
2 1
2 3
1 2
2 3

Output:
0
5
2

Submit solution

Coming later

The grading service will be connected in a later migration step. You can inspect the task and your previous results now.