Once, the kingdom of the North was attacked by the Westerlands. So, North got ready for battle with their army. Initially, all the members of the troop were walking in a single direction. But as the battle continued, they started to split in different directions. Each soldier is having a unique id. In each troop, the captain is the soldier with greatest ID. Now king needs to know the ID of captain for each soldier. Formally stating, there is a line of soldiers standing in increasing order of IDs. Two types of queries are coming.
Input Format
The first line of the input contains N and Q denoting number of soldiers and total number of queries respectively.
The second line contains N integers denoting ids of soldiers, A1, A2, .... , AN.
For next Q lines, each line contains a query.
The first integer denotes type of the query. For each query of type 1, next integer denote X. For each query of type 2, next integer denote id.
Constraints
Output Format
For each query of type 2, output a single integer on a new line containing the id of his captain.