You are given an array consisting of elements . You must process queries and there are two types of queries:
You can perform the following operation in order to make elements equal:
Note: You do not have to modify the original array in a query of type 2.
Input format
Output format
Print a single integer for every query of the second type.
Constraints
The types of queries are either 1 or 2.
If the type is 1:
If the type is 2:
Our initial array is [1,3,4,1] and now we will process the queries: