#include <bits/stdc++.h>
using namespace std;
string alpha = "abcdefghijklmnopqrstuvwxyz";
const long long mod = 1e9 + 7;
const long long inf = 2e18 + 5;
const long long nax = 301010;
vector<vector<long long>> g;
vector<long long> a;
long long pre[nax], pos[nax], visited[nax], depth[nax];
long long t = 1;
void dfs(long long u, long long d = 0) {
  depth[u] = d;
  visited[u] = true;
  pre[u] = t;
  for (auto v : g[u]) {
    if (!visited[v]) {
      t++;
      dfs(v, d + 1);
    }
  }
  pos[u] = t;
}
class SegmentTree {
 public:
  vector<long long> tree;
  vector<long long> high;
  vector<long long> low;
  vector<long long> delta;
  SegmentTree(long long n) {
    tree = vector<long long>(4 * n + 1);
    high = vector<long long>(4 * n + 1);
    low = vector<long long>(4 * n + 1);
    delta = vector<long long>(4 * n + 1);
    init(1, 1, n);
  }
  void init(long long i, long long a, long long b) {
    low[i] = a;
    high[i] = b;
    if (a == b) {
      return;
    }
    long long mid = (a + b) / 2;
    init(2 * i, a, mid);
    init(2 * i + 1, mid + 1, b);
  }
  void propagate(long long i) {
    delta[2 * i] += delta[i];
    delta[2 * i + 1] += delta[i];
    delta[i] = 0;
  }
  void update(long long i) {
    tree[i] =
        min(tree[2 * i] + delta[2 * i], tree[2 * i + 1] + delta[2 * i + 1]);
  }
  void _increment(long long i, long long a, long long b, long long x) {
    if (b < low[i] or a > high[i]) {
      return;
    }
    if (a <= low[i] and b >= high[i]) {
      delta[i] += x;
      return;
    }
    propagate(i);
    _increment(2 * i, a, b, x);
    _increment(2 * i + 1, a, b, x);
    update(i);
  }
  long long _query(long long i, long long a, long long b) {
    if (b < low[i] or a > high[i]) {
      return inf;
    }
    if (a <= low[i] and b >= high[i]) {
      return tree[i] + delta[i];
    }
    propagate(i);
    long long res = min(_query(2 * i, a, b), _query(2 * i + 1, a, b));
    update(i);
    return res;
  }
  void increment(long long a, long long b, long long x) {
    _increment(1, a, b, x);
  }
  long long query(long long a, long long b) { return _query(1, a, b); }
};
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, q;
  cin >> n >> q;
  g = vector<vector<long long>>(n + 1);
  a = vector<long long>(n + 1);
  for (long long i = (1); i < (n + 1); i++) cin >> a[i];
  for (long long i = (0); i < (n - 1); i++) {
    long long u, v;
    cin >> u >> v;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  dfs(1);
  SegmentTree SE = SegmentTree(n + 1);
  SegmentTree SO = SegmentTree(n + 1);
  for (long long i = (1); i < (n + 1); i++) {
    SE.increment(pre[i], pre[i], a[i]);
    SO.increment(pre[i], pre[i], a[i]);
  }
  for (long long i = (0); i < (q); i++) {
    long long t;
    cin >> t;
    if (t == 1) {
      long long x, val;
      cin >> x >> val;
      if (depth[x] & 1) {
        SO.increment(pre[x], pos[x], val);
        SE.increment(pre[x], pos[x], -val);
      } else {
        SO.increment(pre[x], pos[x], -val);
        SE.increment(pre[x], pos[x], val);
      }
    } else {
      long long x;
      cin >> x;
      long long res;
      if (depth[x] & 1) {
        res = SO.query(pre[x], pre[x]);
      } else {
        res = SE.query(pre[x], pre[x]);
      }
      cout << res << '\n';
    }
  }
  return 0;
}
