#include <bits/stdc++.h>
using namespace std;
struct st_gcd {
  int t[4 * 200000];
  int combine(int a, int b) { return a + b; }
  void build(int a[], int v, int tl, int tr) {
    if (tl == tr) {
      t[v] = a[tl];
    } else {
      int tm = (tl + tr) / 2;
      build(a, v * 2, tl, tm);
      build(a, v * 2 + 1, tm + 1, tr);
      t[v] = combine(t[v * 2], t[v * 2 + 1]);
    }
  }
  int get_max(int v, int tl, int tr, int l, int r) {
    if (l > r) return 0;
    if (l == tl && r == tr) return t[v];
    int tm = (tl + tr) / 2;
    return combine(get_max(v * 2, tl, tm, l, min(r, tm)),
                   get_max(v * 2 + 1, tm + 1, tr, max(l, tm + 1), r));
  }
  void update(int v, int tl, int tr, int pos, int new_val) {
    if (tl == tr) {
      t[v] += new_val;
    } else {
      int tm = (tl + tr) / 2;
      if (pos <= tm)
        update(v * 2, tl, tm, pos, new_val);
      else
        update(v * 2 + 1, tm + 1, tr, pos, new_val);
      t[v] = combine(t[v * 2], t[v * 2 + 1]);
    }
  }
};
int n, m, a, b, arr[200000 + 5], tipe, x, val;
vector<int> v[200000 + 5];
vector<pair<int, int> > res, node[200000 + 5];
st_gcd stGcd[2];
void dfs(int cur, int last, bool state) {
  for (int i = 0; i < node[cur].size(); i++) {
    pair<int, int> val = node[cur][i];
    if (val.first >= 0) {
      stGcd[state].update(1, 0, m - 1, val.first, val.second);
    } else {
      int ans = stGcd[state].get_max(1, 0, m - 1, 0, val.second) -
                stGcd[!state].get_max(1, 0, m - 1, 0, val.second) + arr[cur];
      res.push_back(make_pair(val.second, ans));
    }
  }
  for (int i = 0; i < v[cur].size(); i++) {
    if (v[cur][i] == last) continue;
    dfs(v[cur][i], cur, !state);
  }
  for (int i = 0; i < node[cur].size(); i++) {
    pair<int, int> val = node[cur][i];
    if (val.first >= 0) {
      stGcd[state].update(1, 0, m - 1, val.first, -val.second);
    }
  }
}
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 0; i < n; i++) {
    scanf("%d", &arr[i]);
  }
  for (int i = 0; i < n - 1; i++) {
    scanf("%d %d", &a, &b);
    a--;
    b--;
    v[a].push_back(b);
    v[b].push_back(a);
  }
  for (int i = 0; i < m; i++) {
    scanf("%d %d", &tipe, &x);
    x--;
    if (tipe == 1) {
      scanf("%d", &val);
      node[x].push_back(make_pair(i, val));
    } else {
      node[x].push_back(make_pair(-1, i));
    }
  }
  dfs(0, 0, 0);
  sort(res.begin(), res.end());
  for (int i = 0; i < res.size(); i++) {
    printf("%d\n", res[i].second);
  }
}
