#include <bits/stdc++.h>
using namespace std;
const int NMAX = 200005;
int n, m, a[NMAX], i, x, y, cnt, first[NMAX], last[NMAX], aib[2][NMAX], o, val;
vector<int> V[NMAX];
bitset<NMAX> viz, niv;
void DFS(int x) {
  first[x] = ++cnt;
  for (vector<int>::iterator it = V[x].begin(); it != V[x].end(); it++)
    if (!viz[*it]) {
      viz[*it] = 1;
      niv[*it] = !niv[x];
      DFS(*it);
    }
  last[x] = cnt;
}
void update(int aib[], int poz, int val) {
  for (int i = poz; i <= n; i += i & (-i)) aib[i] += val;
}
int query(int aib[], int poz) {
  int r = 0;
  for (int i = poz; i; i -= i & (-i)) r += aib[i];
  return r;
}
int main() {
  scanf("%d%d", &n, &m);
  for (i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (i = 1; i < n; i++) {
    scanf("%d%d", &x, &y);
    V[x].push_back(y);
    V[y].push_back(x);
  }
  viz[1] = 1;
  DFS(1);
  for (; m; m--) {
    scanf("%d", &o);
    if (o == 1) {
      scanf("%d%d", &x, &val);
      update(aib[niv[x]], first[x], val);
      update(aib[niv[x]], last[x] + 1, -val);
      update(aib[!niv[x]], first[x], -val);
      update(aib[!niv[x]], last[x] + 1, val);
    } else {
      scanf("%d", &x);
      printf("%d\n", query(aib[niv[x]], first[x]) + a[x]);
    }
  }
  return 0;
}
