Osama started his life with his teammate Tareq, so he learnt multiple bad habits from him. One of the bad habits Osama learnt is called: "The Blender of Standards". It's a technique where you merge multiple standard problems into one complicated problem. Unfortunately for you, Osama is one of the setters for this contest.
Osama will give you a graph of $$$N$$$ vertices. The graph initially has no edges. Each vertex $$$i$$$ of the graph has a value $$$A_i$$$. Osama wants you to process $$$Q$$$ queries. Each query is one of the following forms:
To calculate the Osama-uty of some connected component $$$S$$$:
Osama gave this problem a second thought and found out that it was still pretty easy, so he decided to modify the way of giving the input. Please read the input section and the notes section carefully.
Note that the graph may contain self loops and multiple edges.
The first line of the input contains two integers $$$N$$$ and $$$Q$$$ $$$(1 \le N \le 10^5$$$, $$$1 \le Q \le 2\cdot10^5)$$$.
The second line of the input contains $$$N$$$ space-separated integers $$$A_1, A_2, \dots, A_N$$$ $$$(1 \le A_i \le N)$$$, the values written on the vertices.
Each line of the next $$$Q$$$ lines contains four integers describing the queries.
If the current query is an add query, the input will be:
If the current query is an ask query, the input will be:
Read the notes section for more information.
For each query of the second type, print a single line containing the Osama-uty of the connected component $$$S$$$ of the vertex $$$u$$$ after the first $$$t$$$ queries.
3 4 1 2 3 1 3 1 0 2 3 1 1 1 3 2 1 2 3 3 1
1 1
3 5 1 1 3 1 3 1 0 2 3 1 1 1 3 2 1 2 3 3 1 2 3 3 4
1 2 1
Input description: we will assume that the current query is the $$$i_{th}$$$ query.
In the first example:
In the second example:
| Name |
|---|


