You are given a tree T with N nodes rooted at node 1. Each node has a value A[i] associated with it.
You are required to perform Q queries where each query is of type:
Note: There exists at least 1 query of type 2.
Input format
Output format
For each test case, print the answer of queries of type 2 in a new line.
Constraints
1≤T≤102≤N,Q≤1051≤A[i]≤1061≤x≤1061≤p≤1012