CSES - Path Queries
  • Time limit: 1.00 s
  • Memory limit: 512 MB

You are given a rooted tree consisting of nn nodes. The nodes are numbered 1,2,,n1,2,\ldots,n, and node 11 is the root. Each node has a value.

Your task is to process following types of queries:

  1. change the value of node ss to xx
  2. calculate the sum of values on the path from the root to node ss

Input

The first input line contains two integers nn and qq: the number of nodes and queries. The nodes are numbered 1,2,,n1,2,\ldots,n.

The next line has nn integers v1,v2,,vnv_1,v_2,\ldots,v_n: the value of each node.

Then there are n1n-1 lines describing the edges. Each line contains two integers aa and bb: there is an edge between nodes aa and bb.

Finally, there are qq lines describing the queries. Each query is either of the form "1 ss xx" or "2 ss".

Output

Print the answer to each query of type 2.

Constraints

  • 1n,q21051 \le n, q \le 2 \cdot 10^5
  • 1a,b,sn1 \le a,b, s \le n
  • 1vi,x1091 \le v_i, x \le 10^9

Example

Input:

5 3
4 2 5 2 1
1 2
1 3
3 4
3 5
2 4
1 3 2
2 4

Output:

11
8