There are n vertices.
Your task is to perform q queries:
1 a b - add an undirected edge of the length 1 between vertices a and b
2 a - find the distance to the furthest vertex reachable from the vertex a
Guaranteed that graph will not contain loops and cycles during all the time.
INPUT
First line of the input contains two integers n and q (1≤n≤105,1≤q≤3⋅105)
Then follow q lines. The i-th of them contains integers: typei (1≤typei≤2), ai (1≤a≤n) and if typei=1 bi (1≤bi≤n).
OUTPUT
Print the distance which is needed for each query of the second type.