#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5;
const int MOD = 1e9 + 7;
std::vector<long long int> v[N], euler;
bool visit[N];
long long int val[N], first[N], en[N], mx = N, bit[N], bit1[N], ht[N];
void dfs(long long int node, long long int hh) {
  visit[node] = 1;
  first[node] = (int)euler.size();
  ht[node] = hh;
  euler.push_back(node);
  for (auto i : v[node]) {
    if (!visit[i]) {
      dfs(i, hh + 1);
    }
  }
  en[node] = (int)euler.size();
}
void upd(long long int idx, long long int val) {
  while (idx < mx) {
    bit[idx] += val;
    idx += (idx & -idx);
  }
}
long long int get(long long int idx) {
  long long int sum = 0;
  while (idx > 0) {
    sum += bit[idx];
    idx -= (idx & -idx);
  }
  return sum;
}
void upd1(long long int idx, long long int val) {
  while (idx < mx) {
    bit1[idx] += val;
    idx += (idx & -idx);
  }
}
long long int get1(long long int idx) {
  long long int sum = 0;
  while (idx > 0) {
    sum += bit1[idx];
    idx -= (idx & -idx);
  }
  return sum;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, q;
  cin >> n >> q;
  for (int i = 1; i <= n; i++) {
    cin >> val[i];
  }
  for (int i = 0; i < n - 1; i++) {
    long long int x, y;
    cin >> x >> y;
    v[x].push_back(y);
    v[y].push_back(x);
  }
  dfs(1, 0);
  while (q--) {
    long long int type;
    cin >> type;
    if (type == 1) {
      long long int x, value;
      cin >> x >> value;
      if (ht[x] % 2 == 0) {
        upd(first[x] + 1, value);
        upd(en[x] + 1, -value);
      } else {
        upd1(first[x] + 1, value);
        upd1(en[x] + 1, -value);
      }
    } else {
      long long int x;
      cin >> x;
      long long int ans = val[x];
      if (ht[x] % 2 == 0) {
        ans += get(first[x] + 1);
        ans -= get1(first[x] + 1);
      } else {
        ans += get1(first[x] + 1);
        ans -= get(first[x] + 1);
      }
      cout << ans << "\n";
    }
  }
  return 0;
}
