#include <bits/stdc++.h>
using namespace std;
int n, m, cnt, w[400050], a[400050], c[2][400050];
int dp[400050], rk[400050], kth[400050], size[400050];
int tot, last[400050];
struct Edge {
  int from, to, s;
} edges[400050 << 1];
template <typename T>
void read(T &x) {
  long long k = 0;
  char c = getchar();
  x = 0;
  while (!isdigit(c) && c != EOF) k ^= c == '-', c = getchar();
  if (c == EOF) exit(0);
  while (isdigit(c)) x = x * 10 + c - '0', c = getchar();
  x = k ? -x : x;
}
void read_char(char &c) {
  while (!isalpha(c = getchar()) && c != EOF)
    ;
}
void AddEdge(int x, int y) {
  edges[++tot] = Edge{x, y, last[x]};
  last[x] = tot;
}
void dfs(int x, int pre) {
  dp[x] = 1 - dp[pre];
  rk[x] = ++cnt;
  kth[cnt] = x;
  size[x] = 1;
  for (int i = last[x]; i; i = edges[i].s) {
    Edge &e = edges[i];
    if (e.to == pre) continue;
    dfs(e.to, x);
    size[x] += size[e.to];
  }
}
void update(int *c, int x, int tt) {
  while (x <= n) {
    c[x] += tt;
    x += x & -x;
  }
}
int get_sum(int *c, int x) {
  int ans = 0;
  while (x) {
    ans += c[x];
    x -= x & -x;
  }
  return ans;
}
int main() {
  read(n);
  read(m);
  for (int i = 1; i <= n; i++) read(w[i]);
  for (int i = 1; i <= n - 1; i++) {
    int x, y;
    read(x);
    read(y);
    AddEdge(x, y);
    AddEdge(y, x);
  }
  dfs(1, 0);
  for (int i = 1; i <= m; i++) {
    int id, x, val;
    read(id);
    if (id == 1) {
      read(x);
      read(val);
      update(c[dp[x]], rk[x], val);
      update(c[dp[x]], rk[x] + size[x], -val);
    }
    if (id == 2) {
      read(x);
      int ans = get_sum(c[dp[x]], rk[x]) - get_sum(c[1 - dp[x]], rk[x]);
      ans += w[x];
      printf("%d\n", ans);
    }
  }
}
