#include <bits/stdc++.h>
using namespace std;
template <class T>
class Nop {
  constexpr T operator()(const T& lhs, const T& rhs) const { return lhs; }
};
template <class T, typename QueryOp, typename ModOp, typename MultOp,
          T identity>
class segtree {
 public:
  segtree(int size) : N(next_pow(size)) {
    data = (pair<T, T>*)calloc(N * 2, sizeof(pair<T, T>));
    for (int i = 0; i < 2 * N; i++) {
      data[i].second = identity;
    }
    build(N, 2 * N);
  }
  segtree(vector<T> init) : segtree(init.size()) {
    for (unsigned i = N; i < N + init.size(); i++) {
      data[i].first = init[i - N];
    }
    build(N, 2 * N);
  }
  ~segtree() { free(data); }
  T query(int s, int e) { return query(s, e, 0, N, 1); }
  T query(int s, int e, int _s, int _e, int _i) {
    if (s <= _s && e >= _e) return query(_i, _s, _e);
    propagateDown(_i, _s, _e);
    int m = (_s + _e) / 2;
    if (s >= m) return query(s, e, m, _e, _i * 2 + 1);
    if (e <= m) return query(s, e, _s, m, _i * 2);
    return QueryOp()(query(s, e, _s, m, _i * 2),
                     query(s, e, m, _e, _i * 2 + 1));
  }
  void update(int s, int e, int x) { update(s, e, x, 0, N, 1); }
  void update(int s, int e, int x, int _s, int _e, int _i) {
    int m = (_s + _e) / 2;
    if (s <= _s && e >= _e) {
      data[_i].second = ModOp()(data[_i].second, x);
    } else {
      propagateDown(_i, _s, _e);
      if (s >= m) {
        update(s, e, x, m, _e, _i * 2 + 1);
      } else if (e <= m) {
        update(s, e, x, _s, m, _i * 2);
      } else {
        update(s, e, x, m, _e, _i * 2 + 1);
        update(s, e, x, _s, m, _i * 2);
      }
      propagateUp(_i, _s, _e);
    }
  }
  void print() {
    for (int i = 1; i < 2 * N; i++) {
      cerr << data[i].first << "|" << data[i].second << " ";
    }
    cerr << endl;
  }

 private:
  pair<T, T>* data;
  const int N;
  T query(int i, int s, int e) {
    return ModOp()(data[i].first, MultOp()(data[i].second, e - s));
  }
  void propagateDown(int i, int s, int e) {
    if (data[i].second != identity) {
      data[i * 2].second = ModOp()(data[i * 2].second, data[i].second);
      data[i * 2 + 1].second = ModOp()(data[i * 2 + 1].second, data[i].second);
      data[i].second = identity;
      propagateUp(i, s, e);
    }
  }
  void propagateUp(int i, int s, int e) {
    data[i] = {QueryOp()(query(i * 2, s, (s + e) / 2),
                         query(i * 2 + 1, (s + e) / 2, e)),
               identity};
  }
  void build(int s, int e) {
    if (e <= N) {
      for (int i = s; i < e; i++) {
        data[i] = {QueryOp()(data[i * 2].first, data[i * 2 + 1].first),
                   identity};
      }
    }
    if (s > 0) {
      build(s / 2, (e + 1) / 2);
    }
  }
  int next_pow(int size) {
    int s = 1;
    while (s < size) s <<= 1;
    return s;
  }
};
vector<vector<int>> conns;
vector<bool> inverted;
vector<int> first;
vector<int> last;
void invert(int pos, int par, bool inv, vector<int>& vals) {
  vals[pos] *= 1 - 2 * inv;
  inverted[pos] = inv;
  for (int c : conns[pos])
    if (c != par) invert(c, pos, !inv, vals);
}
template <typename V>
void traverse(int pos, int par, V&& vals) {
  first[pos] = vals.size();
  vals.push_back(pos);
  for (int c : conns[pos])
    if (c != par) traverse(c, pos, vals);
  last[pos] = vals.size();
  vals.push_back(pos);
}
int main() {
  int n, m;
  cin >> n >> m;
  conns.resize(n);
  vector<int> initvals(n);
  inverted.resize(n);
  last.resize(n);
  first.resize(n);
  for (int i = 0; i < n; i++) {
    cin >> initvals[i];
  }
  for (int i = 0; i < n - 1; i++) {
    int a, b;
    cin >> a >> b;
    a--;
    b--;
    conns[a].push_back(b);
    conns[b].push_back(a);
  }
  invert(0, 0, 0, initvals);
  vector<long long> vals;
  traverse(0, 0, vals);
  transform(vals.begin(), vals.end(), vals.begin(),
            [&initvals](int p) { return initvals[p]; });
  segtree<long long, plus<long long>, plus<long long>, multiplies<long long>, 0>
      tree(vals);
  for (int i = 0; i < m; i++) {
    int a, x, v;
    cin >> a >> x;
    x--;
    if (a == 1) {
      cin >> v;
      tree.update(first[x], last[x] + 1, v * (1 - 2 * inverted[x]));
    } else {
      cout << (1 - 2 * inverted[x]) * tree.query(first[x], first[x] + 1)
           << "\n";
    }
  }
}
