#include <bits/stdc++.h>   using namespace std;   int start[200010], finish[200010], cnt, n, m, a[200010], dis[200010];   long long tree[2][8 * 200010];   vector<int> adj[200010], nodes[2], starts[2];   void update(int v, int vl, int vr, int l, int r, int val, int k) {     int mid = (vl + vr) / 2;     if (l <= vl && vr <= r) {       tree[k][v] += val;       return;     }     if (vr < l || r < vl) return;     update(2 * v, vl, mid, l, r, val, k);     update(2 * v + 1, mid + 1, vr, l, r, val, k);   }   long long getVal(int v, int vl, int vr, int idx, int k) {     int mid = (vl + vr) / 2;     if (vl == vr) return tree[k][v];     if (idx <= mid)       return tree[k][v] + getVal(2 * v, vl, mid, idx, k);     else       return tree[k][v] + getVal(2 * v + 1, mid + 1, vr, idx, k);   }   void dfs(int v, int f, int d) {     cnt++;     start[v] = cnt;     nodes[d % 2].push_back(v);     starts[d % 2].push_back(start[v]);     dis[v] = d % 2;     for (__typeof(((int)((adj[v]).size())) - 1) i = (0);          i <= (((int)((adj[v]).size())) - 1); i++)       if (adj[v][i] != f) dfs(adj[v][i], v, d + 1);     finish[v] = cnt;   }   int main() {     ios::sync_with_stdio(0);     cin.tie(0);     cin >> n >> m;     for (__typeof(n) i = (1); i <= (n); i++) cin >> a[i];     for (__typeof(n - 1) i = (1); i <= (n - 1); i++) {       int u, v;       cin >> u >> v;       adj[u].push_back(v);       adj[v].push_back(u);     }     dfs(1, -1, 0);     for (__typeof(n) i = (1); i <= (n); i++) {       int k = dis[i];       int idx = lower_bound((starts[k]).begin(), (starts[k]).end(), start[i]) -                 starts[k].begin();       idx++;       update(1, 1, n, idx, idx, a[i], k);     }     starts[0].push_back((1000 * 1000 * 1000));     starts[1].push_back((1000 * 1000 * 1000));     for (__typeof(m) i = (1); i <= (m); i++) {       int q, x, v;       cin >> q;       if (q == 1) {         cin >> x >> v;         int k = dis[x];         int idx1 = lower_bound((starts[k]).begin(), (starts[k]).end(), start[x]) -                    starts[k].begin();         int idx2 =             lower_bound((starts[k]).begin(), (starts[k]).end(), finish[x]) -             starts[k].begin();         int idx3 = lower_bound((starts[1 - k]).begin(), (starts[1 - k]).end(),                                start[x]) -                    starts[1 - k].begin();         int idx4 = lower_bound((starts[1 - k]).begin(), (starts[1 - k]).end(),                                finish[x]) -                    starts[1 - k].begin();         if (idx2 >= ((int)((nodes[k]).size())) ||             finish[nodes[k][idx2]] != finish[x])           idx2--;         if (idx4 >= ((int)((nodes[1 - k]).size())) ||             finish[nodes[1 - k][idx4]] != finish[x])           idx4--;         idx1++;         idx2++;         idx3++;         idx4++;         if (idx1 <= idx2) update(1, 1, n, idx1, idx2, v, k);         if (idx3 <= idx4) update(1, 1, n, idx3, idx4, -v, 1 - k);       } else {         cin >> x;         int k = dis[x];         int idx = lower_bound((starts[k]).begin(), (starts[k]).end(), start[x]) -                   starts[k].begin();         idx++;         cout << getVal(1, 1, n, idx, k) << endl;       }     }     return 0;   }