Iahub likes trees very much. Recently he discovered an interesting tree named propagating tree. The tree consists of *n* nodes numbered from 1 to *n*, each node *i* having an initial value *a*<sub class="lower-index">*i*</sub>. The root of the tree is node 1.

This tree has a special property: when a value *val* is added to a value of node *i*, the value -*val* is added to values of all the children of node *i*. Note that when you add value -*val* to a child of node *i*, you also add -(-*val*) to all children of the child of node *i* and so on. Look an example explanation to understand better how it works.

This tree supports two types of queries:
 -  "1 *x* *val*" — *val* is added to the value of node *x*; -  "2 *x*" — print the current value of node *x*. 
In order to help Iahub understand the tree better, you must answer *m* queries of the preceding type.
The first line contains two integers *n* and *m* (1 ≤ *n*, *m* ≤ 200000). The second line contains *n* integers *a*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub>, ..., *a*<sub class="lower-index">*n*</sub> (1 ≤ *a*<sub class="lower-index">*i*</sub> ≤ 1000). Each of the next *n*–1 lines contains two integers *v*<sub class="lower-index">*i*</sub> and *u*<sub class="lower-index">*i*</sub> (1 ≤ *v*<sub class="lower-index">*i*</sub>, *u*<sub class="lower-index">*i*</sub> ≤ *n*), meaning that there is an edge between nodes *v*<sub class="lower-index">*i*</sub> and *u*<sub class="lower-index">*i*</sub>.

Each of the next *m* lines contains a query in the format described above. It is guaranteed that the following constraints hold for all queries: 1 ≤ *x* ≤ *n*, 1 ≤ *val* ≤ 1000.
import collections
class FenwikTree:
    def construct(arr):
        n = len(arr)
        fenwick = [0] + arr[:]
        for i in range(n):
            j = i + (i & -i)
            if j < n:
                fenwick[j] += fenwick[i]
        return fenwick
    
    def getSum(arr, i):
        ans = 0
        while i > 0:
            ans += arr[i]
            i -= i & -i
        return ans
    
    def update(arr, i, val):
        while i < len(arr):
            arr[i] += val
            i += i & -i
    
def eular_path(adj, root, n):
    nodeToChild = collections.defaultdict(list)
    vis = set([root])
    stack = collections.deque([root])
    res = []
    begin = [-1] * n
    end = [-1] * n

    while stack:
        node = stack.pop()
        res.append(node)
        end[node-1] = len(res) - 1
        if begin[node-1] == -1:
            begin[node-1] = len(res) - 1 
        
        for child in adj[node]:
            if child not in vis:
                nodeToChild[node].append(child)
                vis.add(child)
                stack.append(node)
                stack.append(child)
        
    return res, begin, end, nodeToChild

def sol(arr, adj, qry, n): 
    """
    Theroy:
        Lets assume root -> odd level, its child -> even level, then its child -> odd level and so on

        1: We will first find the eular path of the tree, so that we can easily do the range update and range query
        2: We can note: odd idx in eular path -> even level node,       (0 based idx)
                        even idx in eular path -> odd level node

        example: for first example: eular path = [1, 3, 1, 2, 5, 2, 4, 2, 1]
                                    odd level node = [1, 1, 5, 4, 1]
                                    even level node = [3, 2, 2, 2]

        3: We can note that, all child of x node lie between begin[x] and end[x] in eular path
                            if x is in odd level, then all node between start_idx_of_x_in_odd_level to end_idx_of_x_in_odd_level are child of x in odd lvl
                            if x is in even level, then all node between start_idx_of_x_in_even_level to end_idx_of_x_in_even_level are child of x in even lvl

        4: we can get start_idx_of_x_in_odd/even_level by begin[node-1]//2   (same for end)
        --------------------------------------------------------------------------------------

        so lets say we want to do update qry on node x by val v, as per ques:
            a) if x is in odd level:
                then we will update start_idx_of_x_in_odd_level to end_idx_of_x_in_odd_level by val v
                and then we will go through each immediate child of x:
                    and will update start_idx_of_child_in_even_level to end_idx_of_child_in_even_level by -val v

            similar if x is in even level:

        Can use fenwick tree to do update qry fast

        Final ans for node x: arr[x-1] + fenwick.getSum(start_idx_of_x_in_odd/even_level)
    """
    
    # we are using nodeToChild to get immidiate child of x node
    # Note: its not needed, we can use idx based logic to get this (1st child start idx = begin[x] + 1, 2nd child end idx = end[x] - 1)
    # but this combine with evenSet logic is more readable
    path, begin, end, nodeToChild = eular_path(adj, 1, n)

    # fenwick tree for odd and even level
    odd = [0]*(len(path[::2])+1)
    even = [0]*(len(path[1::2])+1)

    # to know if node is in even level or odd level
    evenSet = set(path[1::2])

    # going through each qry    
    for q in qry:

        # if update qry
        if q[0] == 1:
            _, node, cost = q
            leftIdx, rightIdx = begin[node-1]//2 + 1, end[node-1]//2 + 1

            # if node is in even level, then as discussed in logic
            # we will update even level children by cost and odd level children by -cost
            if node in evenSet:
                FenwikTree.update(even, leftIdx, cost)
                FenwikTree.update(even, rightIdx + 1, -cost)

                for child in nodeToChild[node]:
                    leftIdx, rightIdx = begin[child-1]//2 + 1, end[child-1]//2 + 1
                    FenwikTree.update(odd, leftIdx, -cost)
                    FenwikTree.update(odd, rightIdx + 1, cost)
            
            # else opposite
            else:
                FenwikTree.update(odd, leftIdx, cost)
                FenwikTree.update(odd, rightIdx + 1, -cost)

                for child in nodeToChild[node]:
                    leftIdx, rightIdx = begin[child-1]//2 + 1, end[child-1]//2 + 1
                    FenwikTree.update(even, leftIdx, -cost)
                    FenwikTree.update(even, rightIdx + 1, cost)

        # if query qry, then just simply print ans
        else:
            _, node = q
            idx = begin[node-1]//2  + 1
            if node in evenSet:
                print(FenwikTree.getSum(even, idx) + arr[node-1])
            else:
                print(FenwikTree.getSum(odd, idx) + arr[node-1])

t = 1
for _ in range(t):
    n, m = list(map(int, input().split()))
    arr = list(map(int, input().split()))
    adj = collections.defaultdict(list)
    for _ in range(n-1):
        u, v = list(map(int, input().split()))
        adj[u].append(v)
        adj[v].append(u)
    qry = []
    for _ in range(m):
        qry.append(list(map(int, input().split())))
    sol(arr, adj, qry, n)