Given a tree with N nodes, rooted at node 1. Every node of tree has a value associated with it denoted by an array A.
We perform Q queries of following 2 types on tree:
Find the output for all the queries of type 1.
Input format
It is guaranteed that there will be at least one query of type 1.
Output format
For each query of type 1 print a single integer denoting the answer to that query in a separate line.
Constraints
1≤N,Q≤1051≤A[i],p≤105