#include<iostream>
#include<bits/stdc++.h>
#define ll long long
#define faltu ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
using namespace std;
const int maxn=200005;
ll bit[4*maxn],val[maxn],l[maxn],fd[maxn],idx[maxn];
vector<ll>level[maxn];
ll a[maxn],ans[maxn];
ll n,m,final_1,final_2;
bool mark[maxn];
ll oper(ll x,ll y)
{
    return max(x,y);
}
void build(ll int l,ll int r,ll int ind)
{
    if(l==r)
    {
        bit[ind]=val[ans[l]];
        return;
    }
    ll int mid=(l+r)/2;
    build(l,mid,ind*2ll);
    build(mid+1,r,ind*2ll+1ll);
   // bit[ind]=oper(bit[ind*2ll],bit[ind*2ll+1]);
}
void push(ll int l,ll int r,ll int mid,ll int ind)
{
    if(mark[ind]==false)return;
    mark[ind*2ll]=mark[ind*2ll+1]=true;
    mark[ind]=false;
    bit[ind*2ll]+=bit[ind];
    bit[ind*2ll+1ll]+=bit[ind];
    bit[ind]=0;
}
void update(ll int l,ll int r,ll int ind,ll int tl,ll int tr,ll int val)
{
    if(l>tr||r<tl)return ;
    if(l>=tl&&r<=tr)
    {
        bit[ind]+=val;
        mark[ind]=true;
        return;
    }
    int mid=(l+r)/2ll;
    push(l,r,mid,ind);
    update(l,mid,ind*2ll,tl,tr,val);
    update(mid+1,r,ind*2ll+1,tl,tr,val);
  //  bit[ind]=oper(bit[ind*2ll],bit[ind*2ll+1ll]);
}
ll int query(ll int l,ll int r,ll ind,ll int tl,ll int tr)
{
    if(l>tr||r<tl)return 1e9;
    if(l>=tl&&r<=tr)
    {
        return bit[ind];
    }
    ll int mid=(l+r)/2;
    push(l,r,mid,ind);
    ll int xx=query(l,mid,ind*2ll,tl,tr);
    ll int yy=query(mid+1,r,ind*2ll+1ll,tl,tr);
    if(xx!=1e9)return xx;
    return yy;
    //return oper(xx,yy);
}
int main()
{
    faltu;
    int t=1;
    //cin>>t;
    while(t--)
    {
        cin>>n>>m;
        for(int i=1;i<=n;i++)cin>>val[i];
        vector<int>ed[n+1];
        for(int i=1;i<n;i++)
        {
            ll x,y;
            cin>>x>>y;
            ed[x].push_back(y);
            ed[y].push_back(x);
        }
        function<void(ll,ll,ll)>dfs=[&](ll ind,ll par,ll lev)
        {
            level[lev].push_back(ind);
            l[ind]=lev;
            for(auto it:ed[ind])
            {
                if(it!=par)
                {
                    dfs(it,ind,lev+1);
                }
            }
        };
        dfs(1,1,1);
        for(int i=0;i<=n;i++)idx[i]=-1;
        int ind=1;
        for(int i=1;i<=n;i+=2)
        {
            if(level[i].size()==0)break;
            idx[i]=ind;
            for(auto it:level[i])
            {
                fd[it]=ind;
                ans[ind]=it;
                ind++;
            }
        }
        final_1=ind-1;
        for(int i=2;i<=n;i+=2)
        {
            if(level[i].size()==0)break;
            idx[i]=ind;
            for(auto it:level[i])
            {
                fd[it]=ind;
                ans[ind]=it;
                ind++;
            }
        }
        final_2=ind-1;
        build(1,n,1);
        //cout<<final_1<<" "<<final_2<<endl;
        while(m--)
        {
            int test,x,val;
            cin>>test;
            if(test==1)
            {
                cin>>x>>val;
                int lvl=l[x];
                ll point=fd[x];
                update(1,n,1,point,point,val);
                if(lvl%2)
                {
                    if(idx[lvl+2]!=-1)
                    {
                        update(1,n,1,idx[lvl+2],final_1,val);
                    }
                    if(idx[lvl+1]!=-1)
                    {
                        update(1,n,1,idx[lvl+1],final_2,-val);
                    }
                }
                else
                {
                    if(idx[lvl+2]!=-1)
                    {
                        update(1,n,1,idx[lvl+2],final_2,val);
                    }
                    if(idx[lvl+1]!=-1)
                    {
                        update(1,n,1,idx[lvl+1],final_1,-val);
                    }
                }
            }
            else
            {
                cin>>x;
                ll point=fd[x];
                cout<<query(1,n,1,point,point)<<endl;
            }
        }

    }
}


#include <iostream>
#include <algorithm>
#include <vector>
#include <map>
#include <cmath>
#include <queue>
#include <set>
#include <stack>
#include<sstream>

using namespace std;
#define ll long long

ll t = 0;
vector<ll> g[200001], v;
map<ll, pair<ll, ll>> m;
map<ll, ll> val;
ll level[200001];
pair<ll, ll> lazy[900000], st[900000];

void dfs(ll vtx, ll par, int l) {
    t++;
    ll r = t;
    level[r] = l;
    for (ll i : g[vtx]) {
        if (i != par) {
            dfs(i, vtx, l + 1);
        }
    }
    m[vtx] = {r, t};
    val[r] = v[vtx - 1];
}

void merge(ll i) {
    st[i].first = st[2 * i].first + st[2 * i + 1].first;
    st[i].second = st[2 * i].second + st[2 * i + 1].second;
}

void apply_lazy(ll i, ll l, ll r) {
    st[i].first += (r - l + 1) * lazy[i].first;
    st[i].second += (r - l + 1) * lazy[i].second;
    if (l != r) {
        lazy[2 * i].first += lazy[i].first, lazy[2 * i].second += lazy[i].second;
        lazy[2 * i + 1].first += lazy[i].first, lazy[2 * i + 1].second += lazy[i].second;
    }
    lazy[i].first = lazy[i].second = 0;
}

void update(ll i, ll l, ll r, ll ql, ll qr, ll val, ll odd) {
    apply_lazy(i, l, r);

    if (ql > r || qr < l) {
        return;
    }

    if (l >= ql && r <= qr) {
        if (odd) st[i].first += val;
        else st[i].second += val;
        if (l != r) {
            if (odd) {
                lazy[2 * i].first += val;
                lazy[2 * i + 1].first += val;
            } else {
                lazy[2 * i].second += val;
                lazy[2 * i + 1].second += val;
            }
        }
        return;
    }

    update(2 * i, l, (l + r) / 2, ql, qr, val, odd);
    update(2 * i + 1, (l + r) / 2 + 1, r, ql, qr, val, odd);

    merge(i);
}

ll find(ll i, ll l, ll r, ll qi) {
    apply_lazy(i, l, r);
    if (qi > r || qi < l) {
        return 0;
    }

    if (l == r && r == qi) {
        if (level[l] % 2) {
            return st[i].first;
        }
        return st[i].second;
    }

    auto x = find(2 * i, l, (l + r) / 2, qi);
    auto y = find(2 * i + 1, (l + r) / 2 + 1, r, qi);

    return x + y;
}

void make(ll i, ll l, ll r) {
    if (l == r) {
        ll lev = level[l];
        if (lev % 2) {
            st[i].first = val[l];
        } else {
            st[i].second = val[l];
        }
        return;
    }
    make(2 * i, l, (l + r) / 2);
    make(2 * i + 1, (l + r) / 2 + 1, r);

    merge(i);
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    ll n, q;
    cin >> n >> q;
    v.resize(n);
    for (ll &i : v) {
        cin >> i;
    }
    for (ll i = 0, u, v; i < n - 1; i++) {
        cin >> u >> v;
        g[u].push_back(v), g[v].push_back(u);
    }

    dfs(1, 0, 0);
    make(1, 1, n);

    while (q--) {
        ll ty;
        cin >> ty;
        if (ty == 1) {
            int x, va;
            cin >> x >> va;
            ll lev = level[m[x].first];
            update(1, 1, n, m[x].first, m[x].second, va, lev % 2);
            update(1, 1, n, m[x].first, m[x].second, -va, 1 - (lev % 2));
        } else {
            int x;
            cin >> x;
            cout << find(1, 1, n, m[x].first) << "\n";
        }
    }

}


#include<iostream>
#include<bits/stdc++.h>
#define ll long long
#define faltu ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
using namespace std;
const int maxn=200005;
ll bit[4*maxn],val[maxn],l[maxn],fd[maxn],idx[maxn];
vector<ll>level[maxn];
ll a[maxn],ans[maxn];
ll n,m,final_1,final_2;
bool mark[maxn];
ll oper(ll x,ll y)
{
    return max(x,y);
}
void build(ll int l,ll int r,ll int ind)
{
    if(l==r)
    {
        bit[ind]=val[ans[l]];
        return;
    }
    ll int mid=(l+r)/2;
    build(l,mid,ind*2ll);
    build(mid+1,r,ind*2ll+1ll);
   // bit[ind]=oper(bit[ind*2ll],bit[ind*2ll+1]);
}
void push(ll int l,ll int r,ll int mid,ll int ind)
{
    if(mark[ind]==false)return;
    mark[ind*2ll]=mark[ind*2ll+1]=true;
    mark[ind]=false;
    bit[ind*2ll]+=bit[ind];
    bit[ind*2ll+1ll]+=bit[ind];
    bit[ind]=0;
}
void update(ll int l,ll int r,ll int ind,ll int tl,ll int tr,ll int val)
{
    if(l>tr||r<tl)return ;
    if(l>=tl&&r<=tr)
    {
        bit[ind]+=val;
        mark[ind]=true;
        return;
    }
    int mid=(l+r)/2ll;
    push(l,r,mid,ind);
    update(l,mid,ind*2ll,tl,tr,val);
    update(mid+1,r,ind*2ll+1,tl,tr,val);
  //  bit[ind]=oper(bit[ind*2ll],bit[ind*2ll+1ll]);
}
ll int query(ll int l,ll int r,ll ind,ll int tl,ll int tr)
{
    if(l>tr||r<tl)return 1e9;
    if(l>=tl&&r<=tr)
    {
        return bit[ind];
    }
    ll int mid=(l+r)/2;
    push(l,r,mid,ind);
    ll int xx=query(l,mid,ind*2ll,tl,tr);
    ll int yy=query(mid+1,r,ind*2ll+1ll,tl,tr);
    if(xx!=1e9)return xx;
    return yy;
    //return oper(xx,yy);
}
int main()
{
    faltu;
    int t=1;
    //cin>>t;
    while(t--)
    {
        cin>>n>>m;
        for(int i=1;i<=n;i++)cin>>val[i];
        vector<int>ed[n+1];
        for(int i=1;i<n;i++)
        {
            ll x,y;
            cin>>x>>y;
            ed[x].push_back(y);
            ed[y].push_back(x);
        }
        function<void(ll,ll,ll)>dfs=[&](ll ind,ll par,ll lev)
        {
            level[lev].push_back(ind);
            l[ind]=lev;
            for(auto it:ed[ind])
            {
                if(it!=par)
                {
                    dfs(it,ind,lev+1);
                }
            }
        };
        dfs(1,1,1);
        for(int i=0;i<=maxn;i++)idx[i]=-1;
        int ind=1;
        for(int i=1;i<=n;i+=2)
        {
            if(level[i].size()==0)break;
            idx[i]=ind;
            for(auto it:level[i])
            {
                fd[it]=ind;
                ans[ind]=it;
                ind++;
            }
        }
        final_1=ind-1;
        for(int i=2;i<=n;i+=2)
        {
            if(level[i].size()==0)break;
            idx[i]=ind;
            for(auto it:level[i])
            {
                fd[it]=ind;
                ans[ind]=it;
                ind++;
            }
        }
        final_2=ind-1;
        build(1,n,1);
        //cout<<final_1<<" "<<final_2<<endl;
        while(m--)
        {
            int test,x,val;
            cin>>test;
            if(test==1)
            {
                cin>>x>>val;
                int lvl=l[x];
                ll point=fd[x];
                update(1,n,1,point,point,val);
                if(lvl%2)
                {
                    if(idx[lvl+2]!=-1)
                    {
                        update(1,n,1,idx[lvl+2],final_1,val);
                    }
                    if(idx[lvl+1]!=-1)
                    {
                        update(1,n,1,idx[lvl+1],final_2,-val);
                    }
                }
                else
                {
                    if(idx[lvl+2]!=-1)
                    {
                        update(1,n,1,idx[lvl+2],final_2,val);
                    }
                    if(idx[lvl+1]!=-1)
                    {
                        update(1,n,1,idx[lvl+1],final_1,-val);
                    }
                }
            }
            else
            {
                cin>>x;
                ll point=fd[x];
                cout<<query(1,n,1,point,point)<<endl;
            }
        }

    }
}


#include<bits/stdc++.h>
using namespace std;
int n, y = 0, m;
vector<int> a, start, finish, level;
vector<vector<int>> edges, f;
void update(int i, int val, int b){
    while(i <= n){
        f[i][b] += val;
        i += (i & (-i));
    }
}
int sum(int i, int b){
    int s = 0;
    while(i > 0){
        s += f[i][b];
        i -= (i & (-i));
    }
    return s;
}
void dfs(int s, int p){
    y++;
    start[s] = y;
    finish[s] = y;
    for(int i : edges[s]){
        if(i != p){
            level[i] = 1 + level[s];
            dfs(i, s);
            finish[s] = max(finish[s], finish[i]);
        }
    }
}
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cin >> n >> m;
    a.resize(n + 5);
    edges.resize(n + 5);
    start.resize(n + 5);
    finish.resize(n + 5);
    level.resize(n + 5);
    f = vector<vector<int>>(n + 5, vector<int>(2, 0));
    for(int i = 1; i <= n; i++){
        cin >> a[i];
    }
    for(int i = 1; i < n; i++){
        int w, e;
        cin >> w >> e;
        edges[w].push_back(e);
        edges[e].push_back(w);
    }
    level[1] = 0;
    dfs(1, -1);
    for(int i = 0; i < m; i++){
        int t;
        cin >> t;
        if(t == 1){
            int node, val;
            cin >> node >> val;
            if(level[node] % 2 == 0){
                update(start[node], val, 0);
                update(finish[node] + 1, -val, 0);
                update(start[node], -val, 1);
                update(finish[node] + 1, val, 1);
            }
            else{
                update(start[node], -val, 0);
                update(finish[node] + 1, val, 0);
                update(start[node], val, 1);
                update(finish[node] + 1, -val, 1);
            }
        }
        else{
            int node;
            cin >> node;
            if(level[node] % 2 == 0)
                cout << a[node] + sum(start[node], 0);
            else
                cout << a[node] + sum(start[node], 1);
            cout << "\n";
        }
    }
    return 0;
}


#include <bits/stdc++.h>
#define F first
#define S second
using namespace std;
typedef long long ll;
typedef pair<ll, ll>pll;
const int N = 2e5 + 5;
bool type[N];
vector<int>values,  g[N];
int n, m, lft[N], rgt[N], init_value[N];
ll seg[4 * N], lzy[2][4 * N];
void dfs(int u, int p, bool lvl)
{
    type[u] = lvl;
    lft[u] = values.size();
    values.push_back(init_value[u]);
    for(auto &c : g[u])
        if(c != p)
            dfs(c, u, !lvl);
    rgt[u] = values.size() - 1;
}
void bld(int p, int s, int e)
{
    if(s == e)  return void (seg[p] = values[s]);
    int m = (s + e) >> 1, a = p << 1, b = a | 1;
    bld(a, s, m);
    bld(b, m + 1, e);
    seg[p] = seg[a] + seg[b];
}
void chk(int p, int s, int e)
{
    if(s != e)
    {
        int a = p << 1, b = a | 1;
        lzy[0][a] += lzy[0][p];
        lzy[0][b] += lzy[0][p];
        lzy[1][a] += lzy[1][p];
        lzy[1][b] += lzy[1][p];
        lzy[0][p] = lzy[1][p] = 0;
    }
}
ll qry(int p, int s, int e, int idx, bool t)
{
    chk(p, s, e);
    if(s == e)  return lzy[t][p];
    int m = (s + e) >> 1, a = p << 1, b = a | 1;
    return (idx <= m ? qry(a, s, m, idx, t) : qry(b, m + 1, e, idx, t));
}
void upd(int p, int s, int e, int l, int r, int val, bool t)
{
    chk(p, s, e);
    if(s > r || e < l)
        return;
    if(s >= l && e <= r)
    {
        lzy[t][p] += val;
        lzy[!t][p] -= val;
        chk(p, s, e);
        return;
    }
    int m = (s + e) >> 1, a = p << 1, b = a | 1;
    upd(a, s, m, l, r, val, t);
    upd(b, m + 1, e, l, r, val, t);
}
int main()
{
    ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    cin >> n >> m;
    for(int i = 0;i < n;++i)
        cin >> init_value[i];
    for(int i = 1;i < n;++i)
    {
        int u, v;
        cin >> u >> v;
        --u, --v;
        g[u].push_back(v);
        g[v].push_back(u);
    }
    dfs(0, -1, 0);
    while(m--)
    {
        int t, x, val;
        cin >> t >> x;
        --x;
        if(t == 1)
        {
            cin >> val;
            upd(1, 0, n - 1, lft[x], rgt[x], val, type[x]);
        }
        else
            cout << init_value[x] + qry(1, 0, n - 1, lft[x], type[x]) << '\n';
    }
//    for(auto &it : values)
//        cout << it << ' ';
//    for(int i = 0;i < n;++i)
//        cout << i << ' ' << lft[i] << ' ' << rgt[i] << ' ' << type[i] << '\n';
    return 0;
}


/*@shutoshsuman99*/
#include<bits/stdc++.h>
using namespace std;
#include<cstdio>
#define pi 3.141592653589
#define pb push_back
#define ld long double
#define rem 1000000007
#define rem1 998244353
#define inf 1e18+1e17
#define F first
#define S second
#define pii pair<long long,long long>
#define p_q priority_queue <ll, vector<ll>, greater<ll> >
#define m_sp multiset <pair <ll,ll> >
#define el "\n"
#define sp " "
typedef long long ll;
ll Pow(ll x,ll y,ll m)
{ if (y == 0) return 1; ll p = Pow(x, y/2, m) % m;
p = (p * p) % m;return (y%2 == 0)? p : (x * p) % m; }
vector <ll> v[200005],vis(200005),lev(200005),start(200005),e(200005);
ll t=0;
int T[(int)4e6+5],S[(int)4e6+5],E[(int)4e6+5],lazy[(int)4e6+5],A[(int)4e6+5];
void dfs(ll x, ll l)
{
	vis[x]=1;
	start[x]=t; lev[x]=l;
	t=t+1;
	for(auto i:v[x])
	{
		if(!vis[i])
		dfs(i,l+1);
	}
	e[x]=t-1;
}
int calculate(int node)
{
	return (T[node]+lazy[node]*(E[node]-S[node]+1));
}
void lazypropagation(int node)
{
	lazy[2*node]+=lazy[node];
	lazy[2*node+1]+=lazy[node];
	lazy[node]=0;
}
void build(int node,int l,int r)
{
	S[node]=l;
	E[node]=r;
	if(l==r)
	{
		T[node]=A[l];
		return ;
	}
	int mid=(l+r)/2;
	build(2*node,l,mid);
	build(2*node+1,mid+1,r);
	T[node]=T[2*node]+T[2*node+1];
	return;
}
void update(int node,int l,int r,int x)
{
	if((S[node]>r) || (E[node]<l))
	return ;
	if((S[node]>=l) && (E[node]<=r))
	{
		lazy[node]+=x;
		return ;
	}
	lazypropagation(node);
	update(2*node,l,r,x);
	update(2*node+1,l,r,x);
	T[node]=calculate(2*node)+calculate(2*node+1);
}
int query(int node,int l,int r)
{
	if(S[node]>r || E[node]<l)
		return 0;
	if(S[node]>=l && E[node]<=r)
		return calculate(node);
	lazypropagation(node);
	int left=query(2*node,l,r);
	int right=query(2*node+1,l,r);
	T[node]=calculate(2*node)+calculate(2*node+1);
	return (left+right);
}
main()
{
	// fast io
	ll i,j=0;
	ll n,m;
	cin>>n>>m;
	vector <ll> a(n+1);
	for(i=1;i<=n;i++)
	cin>>a[i];
	for(i=0;i<n-1;i++)
	{
		ll x,y;
		cin>>x>>y;
		v[x].push_back(y);
		v[y].push_back(x);
	}
	build(1,0,n-1);
	dfs(1,0);
	for(i=0;i<m;i++)
	{
		ll type;
		cin>>type;
		if(type==1)
		{
			ll x,val;
			cin>>x>>val;
			if(lev[x]&1)
			val=-val;
			update(1,start[x],e[x],val);
		}
		else
		{
			ll x;
			cin>>x;
			ll ans = query(1,start[x],start[x]);
			if(lev[x]&1)
			ans=-ans;
			cout<<ans+a[x]<<el;
		}
	}
}


#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define pi pair<ll, ll>
#define mp make_pair
#define pb push_back
#define vi vector<ll>
#define pd pair<double, double>
#define vp vector<pi>
#define f(i, n) for(int i = 0; i < n; i++)
#define fo(i, a, n) for(int i = a; i < n; i++)
#define mod (1000*1000*1000+7)
#define sz(x) int((x).size())
#define all(x) x.begin(),x.end()
#define DBG(v) cerr << #v << " = " << (v) << endl;
ll INF = (1ll<<61);

using namespace std;

vi *g;
int disc[200005];
int st[200005];
int don[200005];
int a[200005];
int dep[200005];
int seqsz = 0;

void dfs(int V, int pV){
  vi &adj = g[V];
  st[V] = seqsz;
  seqsz++;
  for(auto k : adj){
    if(pV == k) continue;
    dep[k] = dep[V] ^ 1;
    dfs(k, V);
  }
  don[V] = seqsz - 1;
}

bool comp(int i, int j){
  return st[i] < st[j];
}

template<class V, class U> struct SegTree {
	int n;
	vector<V> st;
	vector<U> lazy;
	vector<int> leaves;

	SegTree(const int n) : n(n) {
		leaves.resize(n);
		init(1, 0, n - 1);
		lazy.resize(st.size());
	}

	void init(const int si, const int lo, const int hi) { // init st[] and leaves[]
		if (lo == hi) {
			if(si >= (int)st.size()) st.resize(si + 1);
			st[si] = V(); // optional if V(V(), V()) = V() ---- | ---- cin >> ??
			leaves[lo] = si;
		} else {
			const int mid = (lo + hi) >> 1;
			init(si << 1, lo, mid);
			init(si << 1 | 1, mid + 1, hi);
			st[si] = V(st[si << 1], st[si << 1 | 1]); // optional if T(T(), T()) = T()
		}
	}

	void updateLazy(const int si, const int lo, const int hi) {
		lazy[si].apply(st[si], lo, hi);
		if (lo != hi) {
			lazy[si << 1] = U(lazy[si << 1], lazy[si]);
			lazy[si << 1 | 1] = U(lazy[si << 1 | 1], lazy[si]);
		}
		lazy[si] = U();
	}

	V query(const int l, const int r) { return (l <= r && l < n && r >= 0) ? query(l, r, 1, 0, n - 1) : V(); }
	V query(const int l, const int r, const int si, const int lo, const int hi) {
		updateLazy(si, lo, hi);
		if (l <= lo && hi <= r) return st[si];

		const int mid = (lo + hi) >> 1;
		if (r <= mid) return query(l, r, si << 1, lo, mid);
		if (mid < l) return query(l, r, si << 1 | 1, mid + 1, hi);
		return V(query(l, r, si << 1, lo, mid), query(l, r, si << 1 | 1, mid + 1, hi));
	}

	void update(const int l, const int r, const U u) { if (l <= r) update(l, r, u, 1, 0, n - 1); }
	void update(const int l, const int r, const U &u, const int si, const int lo, const int hi) {
		if (l <= lo && hi <= r) {
			lazy[si] = U(lazy[si], u);
			updateLazy(si, lo, hi);
		} else {
			updateLazy(si, lo, hi);
			if (hi < l || r < lo) return;
			const int mid = (lo + hi) >> 1;
			update(l, r, u, si << 1, lo, mid);
			update(l, r, u, si << 1 | 1, mid + 1, hi);
			st[si] = V(st[si << 1], st[si << 1 | 1]);
		}
	}
};

struct StVal { // define
	ll v = 0; // optional
	StVal() {}
	StVal(const ll v) : v(v) {} // optional
	StVal(const StVal &v1, const StVal &v2) { v = v1 + v2; }
	operator ll() const { return v; } // optional
};

struct StUpdate { // define
	ll v = 0; // optional
	StUpdate() {}
	StUpdate(const ll v) : v(v) {} // optional
	StUpdate(const StUpdate &u1, const StUpdate &u2) { v = u1 + u2; }
	operator ll() const { return v; } // optional
	void apply(StVal &v, const int lo, const int hi) { // omit last 2 arguments if non-lazy segment tree
		v.v += this->v * (hi - lo + 1);
	}
};

typedef SegTree<StVal, StUpdate> MyST;

int main(int argc, char* argv[])
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL); cout.tie(NULL);
    int n, m; cin >> n >> m;
    g = new vi[n+1];
    f(i, n) cin >> a[i+1];
    f(i, n-1){
      int a, b; cin >> a >> b;
      g[a].pb(b);
      g[b].pb(a);
    }

    f(i, n+1) disc[i] = i;
    dfs(1, -1);
    sort(disc+1, disc + n+1, comp);

    MyST tr[] = {MyST(n+1), MyST(n+1)};
    f(i, n) cout << disc[i+1] << " ";
    cout << endl;
    f(i, n) cout << st[i+1] << " ";
    cout << endl;
    f(i, n) cout << don[i+1] << " ";
    cout << endl;

    fo(i, 1, n+1){
      tr[dep[i]].update(st[i], st[i], a[i]);
    }

    while(m--){
      int t, a, b;
      cin >> t >> a;
      if(t==1){
        cin >> b;
        tr[dep[a]].update(st[a], don[a], b);
        tr[!dep[a]].update(st[a], don[a], -b);
      }else{
        cout << tr[dep[a]].query(st[a], st[a]) << endl;
      }
    }

    return 0;
}


#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define pi pair<ll, ll>
#define mp make_pair
#define pb push_back
#define vi vector<ll>
#define pd pair<double, double>
#define vp vector<pi>
#define f(i, n) for(int i = 0; i < n; i++)
#define fo(i, a, n) for(int i = a; i < n; i++)
#define mod (1000*1000*1000+7)
#define sz(x) int((x).size())
#define all(x) x.begin(),x.end()
#define DBG(v) cerr << #v << " = " << (v) << endl;
ll INF = (1ll<<61);

using namespace std;

vi *g;
int disc[200005];
int st[200005];
int don[200005];
int a[200005];
int dep[200005];
int seqsz = 0;

void dfs(int V, int pV){
  vi &adj = g[V];
  st[V] = seqsz;
  seqsz++;
  for(auto k : adj){
    if(pV == k) continue;
    dep[k] = dep[V] ^ 1;
    dfs(k, V);
  }
  don[V] = seqsz - 1;
}

bool comp(int i, int j){
  return st[i] < st[j];
}

template<class V, class U> struct SegTree {
	int n;
	vector<V> st;
	vector<U> lazy;
	vector<int> leaves;

	SegTree(const int n) : n(n) {
		leaves.resize(n);
		init(1, 0, n - 1);
		lazy.resize(st.size());
	}

	void init(const int si, const int lo, const int hi) { // init st[] and leaves[]
		if (lo == hi) {
			if(si >= (int)st.size()) st.resize(si + 1);
			st[si] = V(); // optional if V(V(), V()) = V() ---- | ---- cin >> ??
			leaves[lo] = si;
		} else {
			const int mid = (lo + hi) >> 1;
			init(si << 1, lo, mid);
			init(si << 1 | 1, mid + 1, hi);
			st[si] = V(st[si << 1], st[si << 1 | 1]); // optional if T(T(), T()) = T()
		}
	}

	void updateLazy(const int si, const int lo, const int hi) {
		lazy[si].apply(st[si], lo, hi);
		if (lo != hi) {
			lazy[si << 1] = U(lazy[si << 1], lazy[si]);
			lazy[si << 1 | 1] = U(lazy[si << 1 | 1], lazy[si]);
		}
		lazy[si] = U();
	}

	V query(const int l, const int r) { return (l <= r && l < n && r >= 0) ? query(l, r, 1, 0, n - 1) : V(); }
	V query(const int l, const int r, const int si, const int lo, const int hi) {
		updateLazy(si, lo, hi);
		if (l <= lo && hi <= r) return st[si];

		const int mid = (lo + hi) >> 1;
		if (r <= mid) return query(l, r, si << 1, lo, mid);
		if (mid < l) return query(l, r, si << 1 | 1, mid + 1, hi);
		return V(query(l, r, si << 1, lo, mid), query(l, r, si << 1 | 1, mid + 1, hi));
	}

	void update(const int l, const int r, const U u) { if (l <= r) update(l, r, u, 1, 0, n - 1); }
	void update(const int l, const int r, const U &u, const int si, const int lo, const int hi) {
		if (l <= lo && hi <= r) {
			lazy[si] = U(lazy[si], u);
			updateLazy(si, lo, hi);
		} else {
			updateLazy(si, lo, hi);
			if (hi < l || r < lo) return;
			const int mid = (lo + hi) >> 1;
			update(l, r, u, si << 1, lo, mid);
			update(l, r, u, si << 1 | 1, mid + 1, hi);
			st[si] = V(st[si << 1], st[si << 1 | 1]);
		}
	}
};

struct StVal { // define
	ll v = 0; // optional
	StVal() {}
	StVal(const ll v) : v(v) {} // optional
	StVal(const StVal &v1, const StVal &v2) { v = v1 + v2; }
	operator ll() const { return v; } // optional
};

struct StUpdate { // define
	ll v = 0; // optional
	StUpdate() {}
	StUpdate(const ll v) : v(v) {} // optional
	StUpdate(const StUpdate &u1, const StUpdate &u2) { v = u1 + u2; }
	operator ll() const { return v; } // optional
	void apply(StVal &v, const int lo, const int hi) { // omit last 2 arguments if non-lazy segment tree
		v.v += this->v * (hi - lo + 1);
	}
};

typedef SegTree<StVal, StUpdate> MyST;

int main(int argc, char* argv[])
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL); cout.tie(NULL);
    int n, m; cin >> n >> m;
    g = new vi[n+1];
    f(i, n) cin >> a[i+1];
    f(i, n-1){
      int a, b; cin >> a >> b;
      g[a].pb(b);
      g[b].pb(a);
    }

    f(i, n+1) disc[i] = i;
    dfs(1, -1);
    sort(disc+1, disc + n+1, comp);

    MyST tr[] = {MyST(n+1), MyST(n+1)};
    // f(i, n) cout << disc[i+1] << " ";
    // cout << endl;
    // f(i, n) cout << st[i+1] << " ";
    // cout << endl;
    // f(i, n) cout << don[i+1] << " ";
    // cout << endl;

    fo(i, 1, n+1){
      tr[dep[i]].update(st[i], st[i], a[i]);
    }

    while(m--){
      int t, a, b;
      cin >> t >> a;
      if(t==1){
        cin >> b;
        tr[dep[a]].update(st[a], don[a], b);
        tr[!dep[a]].update(st[a], don[a], -b);
      }else{
        cout << tr[dep[a]].query(st[a], st[a]) << endl;
      }
    }

    return 0;
}


#include <iostream>
#include <vector>
#include <chrono>
#include <random>
#include <cassert>

std::mt19937 rng((int) std::chrono::steady_clock::now().time_since_epoch().count());

const int ms = 200200;

int bit[ms];

int qry(int x) {
	int ans = 0;
	for(; x > 0; x -= x & -x) ans += bit[x];
	return ans;
}

void upd(int x, int v) {
	for(; x < ms; x += x & -x) bit[x] += v;
}

void upd(int l, int r, int v) { upd(l, v); upd(r, -v); }

std::vector<int> edges[ms];
int in[ms], out[ms], c = 1;
int h[ms], a[ms], b[ms];

void dfs(int on, int par) {
	in[on] = c++;
	for(auto to : edges[on]) {
		if(to == par) continue;
		h[to] = 1 + h[on];
		dfs(to, on);
	}
	out[on] = c;
}

int main() {
	std::ios_base::sync_with_stdio(false); std::cin.tie(NULL);
	int n, m;
	std::cin >> n >> m;
	for(int i = 0; i < n; i++) {
		std::cin >> a[i];
	}
	for(int i = 1; i < n; i++) {
		int u, v;
		std::cin >> u >> v;
		u--;v--;
		edges[u].push_back(v);
		edges[v].push_back(u);
	}
	dfs(0, 0);
	for(int i = 0; i < n; i++) {
		if(h[i] % 2) {
			a[i] = -a[i];
		}
		upd(in[i], in[i]+1, a[i]);
	}
	while(m--) {
		int t, x;
		std::cin >> t >> x;
		x--;
		if(t == 1) {
			int val;
			std::cin >> val;
			if(h[x] % 2) val = -val;
			upd(in[x], out[x], val);
		} else {
			std::cout << (h[x] % 2 ? -qry(in[x]) : qry(in[x])) << '\n';
		}
	}
}


/* ****revpro**** */
// #pragma GCC target ("avx2")
// #pragma GCC optimization ("O3")
// #pragma GCC optimization ("unroll-loops")
#include<bits/stdc++.h>
#define ll          long long
#define pb          push_back
#define endl	   '\n'
#define pii         pair<ll,ll>
#define vi          vector<ll>
#define all(a)      (a).begin(),(a).end()
#define F           first
#define S           second
#define sz(x)       (ll)x.size()
#define hell        1000000007
#define rep(i,a,b)  for(ll i=a;i<b;i++)
#define repr(i,a,b) for(ll i=b-1;i>=a;i--)
#define lbnd        lower_bound
#define ubnd        upper_bound
#define bs          binary_search
#define mp          make_pair
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define mii	    map<ll,ll>
using namespace std;

#define TIME        cerr << "\nTime elapsed: " << setprecision(5) <<1000.0 * clock() / CLOCKS_PER_SEC << "ms\n";
#define FAST ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define N  200005
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ordered_set tree<double, null_type,less<double>, rb_tree_tag,tree_order_statistics_node_update>
ll n,q;
ll seg[4*N][2],lazy[4*N][2];
void updaterange(ll cur,ll st,ll end,ll l,ll r,ll val,ll flag)
 {
 	if(lazy[cur][flag]!=0)                                    /* 2-change */
 	{
 		seg[cur][flag]+=(end-st+1)*lazy[cur][flag];					/* 3-change */
 		if(st!=end)
 		{
 			lazy[cur<<1][flag]+=lazy[cur][flag];						/* 4-change */
 			lazy[(cur<<1)+1][flag]+=lazy[cur][flag];                   /* 5-change */
 		}
 		lazy[cur][flag]=0;                                    /* 6-change */
 	}
 	if(st>end||st>r||end<l) return;
 	if(l<=st&&end<=r)
 	{
 		seg[cur][flag]+=(end-st+1)*val;					    /* 7-change */
 		if(st!=end)
 		{
 			lazy[(cur<<1)][flag]+=val;                           /* 8-change */
 			lazy[(cur<<1)+1][flag]+=val;                         /* 9-change */
 		}
 		return;
 	}
 	ll mid=(st+end)>>1;
 	updaterange((cur<<1),st,mid,l,r,val,flag);
 	updaterange((cur<<1)+1,mid+1,end,l,r,val,flag);
 	seg[cur][flag]=seg[cur<<1][flag]+seg[(cur<<1)+1][flag];                  /* 10-change */
 }
 ll query(ll cur,ll st,ll end,ll l,ll r,ll flag)
 {
 	if(st>end||st>r||end<l) return 0;
 	if(lazy[cur][flag]!=0)
 	{
 		seg[cur][flag]+=(end-st+1)*lazy[cur][flag];                /* 11-change */
 		if(st!=end)
 		{
 			lazy[(cur<<1)][flag]+=lazy[cur][flag];                    /* 12-change */
 			lazy[(cur<<1)+1][flag]+=lazy[cur][flag];                  /* 13-change */
 		}
 		lazy[cur][flag]=0;
 	}
 	if(st>=l&&end<=r) return seg[cur][flag];
 	ll mid=(st+end)>>1;
 	ll ans1=query(cur<<1,st,mid,l,r,flag);
 	ll ans2=query((cur<<1)+1,mid+1,end,l,r,flag);
 	return ans1+ans2;                                 /* 14-change */
 }
vi v[2];
ll flag[N],sub[N][2];
ll a[N];
vi adj[N];
ll par[N];
ll idx[N];
void dfs(ll node,ll p,ll f)
{
	par[node]=p;
	v[f].pb(node);
	sub[node][1]=1;
	flag[node]=f;
	idx[node]=sz(v[f])-1;
	updaterange(1,0,n,sz(v[f])-1,sz(v[f])-1,a[node],f);
	for(auto i:adj[node])
	{
		if(i!=p)
		{
			dfs(i,node,!f);
			sub[node][0]+=sub[i][1];
			sub[node][1]+=sub[i][0];
		}
	}
}
void solve()
{
	cin>>n>>q;
	rep(i,1,n+1) cin>>a[i];
	rep(i,0,n-1){
		ll x,y;
		cin>>x>>y;
		adj[x].pb(y);
		adj[y].pb(x);
	}
	dfs(1,0,0);
	rep(i,0,q)
	{
		ll t;
		cin>>t;
		if(t==1){
			ll x,val;
			cin>>x>>val;
			updaterange(1,0,n,idx[x],idx[x]+sub[x][1]-1,val,flag[x]);
			// rep(j,1,n+1) cout<<query(1,0,n,idx[j],idx[j],flag[j])<<' ';
			// cout<<endl;
			ll node=0;
			for(auto j:adj[x])
			{
				if(j!=par[x])
				{
					node=j;
					break;
				}
			}
			updaterange(1,0,n,idx[node],idx[node]+sub[x][0]-1,-val,!flag[x]);
			// rep(j,1,n+1) cout<<query(1,0,n,idx[j],idx[j],flag[j])<<' ';
			// cout<<endl;
		}
		else{
			ll x;
			cin>>x;
			cout<<query(1,0,n,idx[x],idx[x],flag[x])<<endl;
		}
	}
}
signed main()
{

		/***********************************/
    unsigned seed = std::chrono::system_clock::now().time_since_epoch().count();
    mt19937_64 generator (seed);
    /***********************************/
 #ifndef ONLINE_JUDGE
      // for getting input from input.txt
     freopen("input.txt", "r", stdin);
//     // for writing output to output.txt
//     freopen("output1.txt", "w", stdout);
 #endif
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	int TESTS=1;
//	cin>>TESTS;
	while(TESTS--)
	{
		solve();

	}
	TIME
	return 0;
}


/*==============================================*\
ID:          shahidul_brur

Name:     Md. Shahidul Islam
Study:      CSE, BRUR
Address:  Rangpur, Bangladesh

 mail: shahidul.cse.brur@gmail.com
 FB  : fb.com/shahidul.brur
 Blog: shahidul-brur.blogspot.com(in Bengali),
       shahidul-brur-en.blogspot.com(in English)
\*===============================================*/
#include<bits/stdc++.h>
/*
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
using namespace __gnu_pbds;
*/
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef pair<ll, int> li;
typedef pair<int, ll> il;
typedef vector<ii> vii;
typedef vector<il> vil;
typedef vector<li> vli;

#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define sz size()
#define all(a)  a.begin(), a.end()
#define mem(a, b)     memset(a, b, sizeof(a))
#define f0(i,b) for(int i=0;i<(b);i++)
#define f1(i,b) for(int i=1;i<=(b);i++)
#define f2(i,a,b) for(int i=(a);i<=(b);i++)
#define fr(i,b,a) for(int i=(b);i>=(a);i--)
#define rep(i,a,b,c) for(int i=(a);i!=(b);i+=(c))

inline int getInt(){int x; scanf("%d", &x);return x;}
inline long getLong() {long x;scanf("%ld", &x);return x;}
inline ll getLLong() {ll x;scanf("%lld", &x);return x;}
inline float getFloat() {float x;scanf("%f", &x);return x;}
inline double getDouble() {double x;scanf("%lf", &x);return x;}
inline ii getPair() {ii p; scanf("%d %d", &p.ff, &p.ss);return p;}
void getCAra(char *x) {scanf("%s", x);}
string getString() {char ch[200005]; scanf("%s", &ch); string s = string(ch); return s;}

void pI(int x) {printf("%d", x);}
void pL(long x) {printf("%ld", x);}
void pLL(ll x) {printf("%lld", x);}
void pUL(ull x) {printf("%llu", x);}
void pF(float x) {printf("%f", x);}
void pD(double x) {printf("%f", x);}
void pS(char x[]) {printf("%s", x);}
#define pCas printf("Case %d:",cas)
#define NL printf("\n")
#define SP printf(" ")
#define MLR int mid=(b+e)>>1,lft=v<<1,rgt=lft|1
#define INVALID -1
int dx8[] = {0, 0, 1, 1, 1, -1, -1, -1};
int dy8[] = {1,-1, 1, -1, 0, 0, -1, 1};

const double PI = acos(-1.0);
const double EPS = 1e-6;
const int MOD = (int)1e9+7;
const int maxn = (int)2e5+5;
const int LOGN = 20;
int val[maxn], lazy[2][4*maxn];
vi g[maxn];
int lev[maxn], st[2][maxn], en[2][maxn], timer[2];
void dfs(int u, int p)
{
    int t = lev[u]%2;
    st[0][u] = ++timer[t];
    bool dif = 0;
    for(int v:g[u])if(v!=p){
        if(!dif)
            st[1][u] = timer[1-t]+1, dif = 1;
        lev[v]=lev[u]+1;
        dfs(v,u);
    }
    en[0][u] = timer[t];
    if(st[1][u])
        en[1][u] = timer[1-t];
}
void propagate(int t, int node, int b, int e)
{
    //cout << "Came to propagate " << node << " [" << b << "," << e << "]\n";
    if(!lazy[t][node] || b==e) return;
    lazy[t][node<<1]+=lazy[t][node];
    lazy[t][(node<<1)|1]+=lazy[t][node];
    lazy[t][node] = 0;
}
int query(int t, int node, int b, int e,int idx)
{
  //  cout << "Came to query " << node << " [" << b << "," << e << "]\n";
    propagate(t,node,b,e);
    if(b==e &&idx==b) return lazy[t][node];
    int mid = (b+e)>>1, lft = node<<1, rgt = lft|1;
    if(idx<=mid)
        return query(t,lft,b,mid,idx);
    return query(t,rgt,mid+1,e,idx);
}
void update(int t, int node, int b, int e, int l, int r, int x)
{
    //cout << "Going to propagate " << node << " [" << b << "," << e << "]\n";
    propagate(t,node,b,e);
    if(r<b || e<l) return;
    //cout << "Came to update " << node << " [" << b << "," << e << "] => [" << l << "," << r << "]\n";

    if(l<=b&&e<=r){
        lazy[t][node]+=x;
        //cout << "Going to propagate " << node << " [" << b << "," << e << "]\n";
        propagate(t,node,b,e);
        return;
    }
    int mid = (b+e)>>1, lft = node<<1, rgt = lft|1;
   // cout << "Going to update " << node << " [" << b << "," << mid << "]\n";
    update(t,lft,b,mid,l,r,x);
    //cout << "Going to update " << node << " [" << mid+1 << "," << e << "]\n";
    update(t,rgt,mid+1,e,l,r,x);
}
int bit[maxn];
int main()
{
    ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);
    //freopen("in.txt", "r", stdin);
    //freopen("out.txt", "w", stdout);
    int n,q;
    cin>>n>>q;
    f1(i,n) cin>>val[i];
    f1(i,n-1)
    {
        int u,v;
        cin>>u>>v;
        g[u].pb(v);
        g[v].pb(u);
    }
    dfs(1,1);
    //f1(i,n) cout << i << ": " << st[0][i] << "->" << en[0][i] << ", " << st[1][i] << "->" << en[1][i] << "\n";
    while(q--)
    {
        int typ;
        cin>>typ;
        if(typ==1)
        {
            int v, x;
            cin>>v>>x;
            int t = lev[v]%2;
            //cout << t << "\n-----\n";
            update(t,1,1,timer[t],st[0][v],en[0][v],+x);
            if(st[1][v])
            {
                //cout << 1-t << "\n-----\n";
                update(1-t,1,1,timer[1-t],st[1][v],en[1][v],-x);
            }
        }
        else
        {
            int v;
            cin>>v;
            int t = lev[v]%2;
            int ans = query(t,1,1,timer[t],st[0][v]);
            cout << ans+val[v] << "\n";
        }
        //cout << "\n\n";
    }
    return 0;
}


/*==============================================*\
ID:          shahidul_brur

Name:     Md. Shahidul Islam
Study:      CSE, BRUR
Address:  Rangpur, Bangladesh

 mail: shahidul.cse.brur@gmail.com
 FB  : fb.com/shahidul.brur
 Blog: shahidul-brur.blogspot.com(in Bengali),
       shahidul-brur-en.blogspot.com(in English)
\*===============================================*/
#include<bits/stdc++.h>
/*
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
using namespace __gnu_pbds;
*/
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef pair<ll, int> li;
typedef pair<int, ll> il;
typedef vector<ii> vii;
typedef vector<il> vil;
typedef vector<li> vli;

#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define sz size()
#define all(a)  a.begin(), a.end()
#define mem(a, b)     memset(a, b, sizeof(a))
#define f0(i,b) for(int i=0;i<(b);i++)
#define f1(i,b) for(int i=1;i<=(b);i++)
#define f2(i,a,b) for(int i=(a);i<=(b);i++)
#define fr(i,b,a) for(int i=(b);i>=(a);i--)
#define rep(i,a,b,c) for(int i=(a);i!=(b);i+=(c))

inline int getInt(){int x; scanf("%d", &x);return x;}
inline long getLong() {long x;scanf("%ld", &x);return x;}
inline ll getLLong() {ll x;scanf("%lld", &x);return x;}
inline float getFloat() {float x;scanf("%f", &x);return x;}
inline double getDouble() {double x;scanf("%lf", &x);return x;}
inline ii getPair() {ii p; scanf("%d %d", &p.ff, &p.ss);return p;}
void getCAra(char *x) {scanf("%s", x);}
string getString() {char ch[200005]; scanf("%s", &ch); string s = string(ch); return s;}

void pI(int x) {printf("%d", x);}
void pL(long x) {printf("%ld", x);}
void pLL(ll x) {printf("%lld", x);}
void pUL(ull x) {printf("%llu", x);}
void pF(float x) {printf("%f", x);}
void pD(double x) {printf("%f", x);}
void pS(char x[]) {printf("%s", x);}
#define pCas printf("Case %d:",cas)
#define NL printf("\n")
#define SP printf(" ")
#define MLR int mid=(b+e)>>1,lft=v<<1,rgt=lft|1
#define INVALID -1
int dx8[] = {0, 0, 1, 1, 1, -1, -1, -1};
int dy8[] = {1,-1, 1, -1, 0, 0, -1, 1};

const double PI = acos(-1.0);
const double EPS = 1e-6;
const int MOD = (int)1e9+7;
const int maxn = (int)2e5+5;
const int LOGN = 20;
int val[maxn], lazy[2][maxn];
vi g[maxn];
int lev[maxn], st[2][maxn], en[2][maxn], timer[2];
void dfs(int u, int p)
{
    int t = lev[u]%2;
    st[0][u] = ++timer[t];
    bool dif = 0;
    for(int v:g[u])if(v!=p){
        if(!dif)
            st[1][u] = timer[1-t]+1, dif = 1;
        lev[v]=lev[u]+1;
        dfs(v,u);
    }
    en[0][u] = timer[t];
    if(st[1][u])
        en[1][u] = timer[1-t];
}
void propagate(int t, int node, int b, int e)
{
    //cout << "Came to propagate " << node << " [" << b << "," << e << "]\n";
    if(!lazy[t][node]) return;
    if(b!=e){
        lazy[t][node<<1]+=lazy[t][node];
        lazy[t][(node<<1)|1]+=lazy[t][node];
    lazy[t][node] = 0;
    }
}
int query(int t, int node, int b, int e,int idx)
{
  //  cout << "Came to query " << node << " [" << b << "," << e << "]\n";
    propagate(t,node,b,e);
    if(b==e &&idx==b) return lazy[t][node];
    int mid = (b+e)>>1, lft = node<<1, rgt = lft|1;
    if(idx<=mid)
        return query(t,lft,b,mid,idx);
    return query(t,rgt,mid+1,e,idx);
}
void update(int t, int node, int b, int e, int l, int r, int x)
{
    //cout << "Going to propagate " << node << " [" << b << "," << e << "]\n";
    propagate(t,node,b,e);
    if(r<b || e<l) return;
    //cout << "Came to update " << node << " [" << b << "," << e << "] => [" << l << "," << r << "]\n";

    if(l<=b&&e<=r){
        lazy[t][node]+=x;
        //cout << "Going to propagate " << node << " [" << b << "," << e << "]\n";
        propagate(t,node,b,e);
        return;
    }
    int mid = (b+e)>>1, lft = node<<1, rgt = lft|1;
   // cout << "Going to update " << node << " [" << b << "," << mid << "]\n";
    update(t,lft,b,mid,l,r,x);
    //cout << "Going to update " << node << " [" << mid+1 << "," << e << "]\n";
    update(t,rgt,mid+1,e,l,r,x);
}
int main()
{
    ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);
    //freopen("in.txt", "r", stdin);
    //freopen("out.txt", "w", stdout);
    int n,q;
    cin>>n>>q;
    f1(i,n) cin>>val[i];
    f1(i,n-1)
    {
        int u,v;
        cin>>u>>v;
        g[u].pb(v);
        g[v].pb(u);
    }
    dfs(1,1);
    //f1(i,n) cout << i << ": " << st[0][i] << "->" << en[0][i] << ", " << st[1][i] << "->" << en[1][i] << "\n";
    while(q--)
    {
        int typ;
        cin>>typ;
        if(typ==1)
        {
            int v, x;
            cin>>v>>x;
            int t = lev[v]%2;
            //cout << t << "\n-----\n";
            update(t,1,1,timer[t],st[0][v],en[0][v],+x);
            if(st[1][v])
            {
                //cout << 1-t << "\n-----\n";
                update(1-t,1,1,timer[1-t],st[1][v],en[1][v],-x);
            }
        }
        else
        {
            int v;
            cin>>v;
            int t = lev[v]%2;
            int ans = query(t,1,1,timer[t],st[0][v]);
            cout << ans+val[v] << "\n";
        }
        //cout << "\n\n";
    }
    return 0;
}


/*==============================================*\
ID:          shahidul_brur

Name:     Md. Shahidul Islam
Study:      CSE, BRUR
Address:  Rangpur, Bangladesh

 mail: shahidul.cse.brur@gmail.com
 FB  : fb.com/shahidul.brur
 Blog: shahidul-brur.blogspot.com(in Bengali),
       shahidul-brur-en.blogspot.com(in English)
\*===============================================*/
#include<bits/stdc++.h>
/*
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
using namespace __gnu_pbds;
*/
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef pair<ll, int> li;
typedef pair<int, ll> il;
typedef vector<ii> vii;
typedef vector<il> vil;
typedef vector<li> vli;

#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define sz size()
#define all(a)  a.begin(), a.end()
#define mem(a, b)     memset(a, b, sizeof(a))
#define f0(i,b) for(int i=0;i<(b);i++)
#define f1(i,b) for(int i=1;i<=(b);i++)
#define f2(i,a,b) for(int i=(a);i<=(b);i++)
#define fr(i,b,a) for(int i=(b);i>=(a);i--)
#define rep(i,a,b,c) for(int i=(a);i!=(b);i+=(c))

inline int getInt(){int x; scanf("%d", &x);return x;}
inline long getLong() {long x;scanf("%ld", &x);return x;}
inline ll getLLong() {ll x;scanf("%lld", &x);return x;}
inline float getFloat() {float x;scanf("%f", &x);return x;}
inline double getDouble() {double x;scanf("%lf", &x);return x;}
inline ii getPair() {ii p; scanf("%d %d", &p.ff, &p.ss);return p;}
void getCAra(char *x) {scanf("%s", x);}
string getString() {char ch[200005]; scanf("%s", &ch); string s = string(ch); return s;}

void pI(int x) {printf("%d", x);}
void pL(long x) {printf("%ld", x);}
void pLL(ll x) {printf("%lld", x);}
void pUL(ull x) {printf("%llu", x);}
void pF(float x) {printf("%f", x);}
void pD(double x) {printf("%f", x);}
void pS(char x[]) {printf("%s", x);}
#define pCas printf("Case %d:",cas)
#define NL printf("\n")
#define SP printf(" ")
#define MLR int mid=(b+e)>>1,lft=v<<1,rgt=lft|1
#define INVALID -1
int dx8[] = {0, 0, 1, 1, 1, -1, -1, -1};
int dy8[] = {1,-1, 1, -1, 0, 0, -1, 1};

const double PI = acos(-1.0);
const double EPS = 1e-6;
const int MOD = (int)1e9+7;
const int maxn = (int)2e5+5;
const int LOGN = 20;
int val[maxn], lazy[2][4*maxn];
vi g[maxn];
int lev[maxn], st[2][maxn], en[2][maxn], timer[2];
void dfs(int u, int p)
{
    int t = lev[u]%2;
    st[0][u] = ++timer[t];
    bool dif = 0;
    for(int v:g[u])if(v!=p){
        if(!dif)
            st[1][u] = timer[1-t]+1, dif = 1;
        lev[v]=lev[u]+1;
        dfs(v,u);
    }
    en[0][u] = timer[t];
    if(st[1][u])
        en[1][u] = timer[1-t];
}

int bit[2][maxn];
void update(int t, int pos, int x)
{
    while(pos<maxn){
        bit[t][pos]+=x;
        pos+=pos&-pos;
    }
}
int query(int t, int pos)
{
    int s = 0;
    while(pos>0){
        s+=bit[t][pos];
        pos-=pos&-pos;
    }
    return s;
}
int main()
{
    ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);
    //freopen("in.txt", "r", stdin);
    //freopen("out.txt", "w", stdout);
    int n,q;
    cin>>n>>q;
    f1(i,n) cin>>val[i];
    f1(i,n-1)
    {
        int u,v;
        cin>>u>>v;
        g[u].pb(v);
        g[v].pb(u);
    }
    dfs(1,1);
    //f1(i,n) cout << i << ": " << st[0][i] << "->" << en[0][i] << ", " << st[1][i] << "->" << en[1][i] << "\n";
    while(q--)
    {
        int typ;
        cin>>typ;
        if(typ==1)
        {
            int v, x;
            cin>>v>>x;
            int t = lev[v]%2;
            //cout << t << "\n-----\n";
            update(t,st[0][v],+x);
            update(t,en[0][v]+1,-x);
            if(st[1][v])
            {
                //cout << 1-t << "\n-----\n";
                update(1-t,st[1][v],-x);
                update(1-t,en[1][v]+1,+x);
            }
        }
        else
        {
            int v;
            cin>>v;
            int t = lev[v]%2;
            int ans = query(t,st[0][v]);
            cout << ans+val[v] << "\n";
        }
        //cout << "\n\n";
    }
    return 0;
}


/*==============================================*\
ID:          shahidul_brur

Name:     Md. Shahidul Islam
Study:      CSE, BRUR
Address:  Rangpur, Bangladesh

 mail: shahidul.cse.brur@gmail.com
 FB  : fb.com/shahidul.brur
 Blog: shahidul-brur.blogspot.com(in Bengali),
       shahidul-brur-en.blogspot.com(in English)
\*===============================================*/
#include<bits/stdc++.h>
/*
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
using namespace __gnu_pbds;
*/
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef pair<ll, int> li;
typedef pair<int, ll> il;
typedef vector<ii> vii;
typedef vector<il> vil;
typedef vector<li> vli;

#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define sz size()
#define all(a)  a.begin(), a.end()
#define mem(a, b)     memset(a, b, sizeof(a))
#define f0(i,b) for(int i=0;i<(b);i++)
#define f1(i,b) for(int i=1;i<=(b);i++)
#define f2(i,a,b) for(int i=(a);i<=(b);i++)
#define fr(i,b,a) for(int i=(b);i>=(a);i--)
#define rep(i,a,b,c) for(int i=(a);i!=(b);i+=(c))

inline int getInt(){int x; scanf("%d", &x);return x;}
inline long getLong() {long x;scanf("%ld", &x);return x;}
inline ll getLLong() {ll x;scanf("%lld", &x);return x;}
inline float getFloat() {float x;scanf("%f", &x);return x;}
inline double getDouble() {double x;scanf("%lf", &x);return x;}
inline ii getPair() {ii p; scanf("%d %d", &p.ff, &p.ss);return p;}
void getCAra(char *x) {scanf("%s", x);}
string getString() {char ch[200005]; scanf("%s", &ch); string s = string(ch); return s;}

void pI(int x) {printf("%d", x);}
void pL(long x) {printf("%ld", x);}
void pLL(ll x) {printf("%lld", x);}
void pUL(ull x) {printf("%llu", x);}
void pF(float x) {printf("%f", x);}
void pD(double x) {printf("%f", x);}
void pS(char x[]) {printf("%s", x);}
#define pCas printf("Case %d:",cas)
#define NL printf("\n")
#define SP printf(" ")
#define MLR int mid=(b+e)>>1,lft=v<<1,rgt=lft|1
#define INVALID -1
int dx8[] = {0, 0, 1, 1, 1, -1, -1, -1};
int dy8[] = {1,-1, 1, -1, 0, 0, -1, 1};

const double PI = acos(-1.0);
const double EPS = 1e-6;
const int MOD = (int)1e9+7;
const int maxn = (int)2e6+5;
const int LOGN = 20;
int val[maxn], lazy[2][4*maxn];
vi g[maxn];
int lev[maxn], st[2][maxn], en[2][maxn], timer[2];
void dfs(int u, int p)
{
    int t = lev[u]%2;
    st[0][u] = ++timer[t];
    bool dif = 0;
    for(int v:g[u])if(v!=p){
        if(!dif)
            st[1][u] = timer[1-t]+1, dif = 1;
        lev[v]=lev[u]+1;
        dfs(v,u);
    }
    en[0][u] = timer[t];
    if(st[1][u])
        en[1][u] = timer[1-t];
}
void propagate(int t, int node, int b, int e)
{
    //cout << "Came to propagate " << node << " [" << b << "," << e << "]\n";
    if(!lazy[t][node] || b==e) return;
    lazy[t][node<<1]+=lazy[t][node];
    lazy[t][(node<<1)|1]+=lazy[t][node];
    lazy[t][node] = 0;
}
int query(int t, int node, int b, int e,int idx)
{
  //  cout << "Came to query " << node << " [" << b << "," << e << "]\n";
    propagate(t,node,b,e);
    if(b==e &&idx==b) return lazy[t][node];
    int mid = (b+e)>>1, lft = node<<1, rgt = lft|1;
    if(idx<=mid)
        return query(t,lft,b,mid,idx);
    return query(t,rgt,mid+1,e,idx);
}
void update(int t, int node, int b, int e, int l, int r, int x)
{
    //cout << "Going to propagate " << node << " [" << b << "," << e << "]\n";
    propagate(t,node,b,e);
    if(r<b || e<l) return;
    //cout << "Came to update " << node << " [" << b << "," << e << "] => [" << l << "," << r << "]\n";

    if(l<=b&&e<=r){
        lazy[t][node]+=x;
        //cout << "Going to propagate " << node << " [" << b << "," << e << "]\n";
        propagate(t,node,b,e);
        return;
    }
    int mid = (b+e)>>1, lft = node<<1, rgt = lft|1;
   // cout << "Going to update " << node << " [" << b << "," << mid << "]\n";
    update(t,lft,b,mid,l,r,x);
    //cout << "Going to update " << node << " [" << mid+1 << "," << e << "]\n";
    update(t,rgt,mid+1,e,l,r,x);
}
int bit[maxn];
int main()
{
    ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);
    //freopen("in.txt", "r", stdin);
    //freopen("out.txt", "w", stdout);
    int n,q;
    cin>>n>>q;
    f1(i,n) cin>>val[i];
    f1(i,n-1)
    {
        int u,v;
        cin>>u>>v;
        g[u].pb(v);
        g[v].pb(u);
    }
    dfs(1,1);
    //f1(i,n) cout << i << ": " << st[0][i] << "->" << en[0][i] << ", " << st[1][i] << "->" << en[1][i] << "\n";
    while(q--)
    {
        int typ;
        cin>>typ;
        if(typ==1)
        {
            int v, x;
            cin>>v>>x;
            int t = lev[v]%2;
            //cout << t << "\n-----\n";
            update(t,1,1,timer[t],st[0][v],en[0][v],+x);
            if(st[1][v])
            {
                //cout << 1-t << "\n-----\n";
                update(1-t,1,1,timer[1-t],st[1][v],en[1][v],-x);
            }
        }
        else
        {
            int v;
            cin>>v;
            int t = lev[v]%2;
            int ans = query(t,1,1,timer[t],st[0][v]);
            cout << ans+val[v] << "\n";
        }
        //cout << "\n\n";
    }
    return 0;
}


# include <bits/stdc++.h>
# include <unordered_map>
# include <unordered_set>
//# include <prettyprint.hpp>
using namespace std;
# define ll long long
# define endl '\n'
struct node{
    int l, r, sign;
    set<int> children;
};
int n, m, vcount = 0;
vector<int> t, a, lazy;
vector<node> tree;
void dfs(int u){
    tree[u].l = ++vcount;
    for(auto v:tree[u].children){
        tree[v].sign = -tree[u].sign;
        tree[v].children.erase(u);
        dfs(v);
    }
    tree[u].r = vcount;
}
void flow(int index){
    t[2*index]+=t[index];
    t[2*index+1]+=t[index];
    t[index] = 0;
}
void update(int index, int start, int end, int l, int r, int val){
    if (l > end || r < start) return;
    if (l <= start && r >= end){
        t[index]+=val;
        return;
    }
    flow(index);
    int mid = (start+end)/2;
    update(2*index, start, mid, l, r, val);
    update(2*index+1, mid+1, end, l, r, val);
}
int query(int index, int start, int end, int l, int r){
    if (l > end || r < start) return 0;
    if (l <= start && r >= end) return t[index];
    flow(index);
    int mid = (start+end)/2;
    return query(2*index, start, mid, l, r) + query(2*index+1, mid+1, end, l, r);
}
int main(){
    cin >> n >> m;
    tree.resize(n), a.resize(n);
    t.resize(4*n), lazy.resize(4*n);
    for(int i = 0; i < n; i++) cin >> a[i];
    for(int i = 0; i < n-1; i++){
        int u, v; cin >> u >> v;
        tree[--u].children.insert(--v);
        tree[v].children.insert(u);
    }
    tree[0].sign = 1;
    dfs(0);
    for(int i = 0; i < m; i++){
        int type, x, val; cin >> type >> x;
        x--;
        if (type == 1){
            cin >> val;
            update(1, 1, n, tree[x].l, tree[x].r, tree[x].sign*val);
        }else{
            cout << a[x]+tree[x].sign*query(1, 1, n, tree[x].l, tree[x].l) << endl;
        }
    }
}


/*input
5 5
1 2 1 1 2
1 2
1 3
2 4
2 5
1 2 3
1 1 2
2 1
2 2
2 4

*/
/*

**************************
*						 *
* AUTHOR :: knight_coder *
*						 *
**************************

*/
#include<bits/stdc++.h>
#define lld         int
#define pb          push_back
#define ppb         pop_back
#define	endl		'\n'
#define mii         map<lld,lld>
#define msi         map<string,lld>
#define mis         map<lld, string>
#define mpi         map<pair<lld ,lld >,lld >
#define pii         pair<lld,lld>
#define vi          vector<int>
#define vpi 		vector<pii>
#define vs          vector<string>
#define all(a)      (a).begin(),(a).end()
#define F           first
#define S           second
#define sz(x)       (lld)x.size()
#define hell        1000000007
#define rrep(i,m,n)	for(lld i=m;i>=n;i--)
#define rep(i,m,n)	for(lld i=m;i<n;i++)
#define lbnd        lower_bound
#define ubnd        upper_bound
#define bs          binary_search
#define mp          make_pair
#define what_is(x)  cerr << #x << " is " << x << endl;
#define pr(x) 		cout<< x << " ";
#define pre(x)		cout<< x << endl ;
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
template<typename T>
using ordered_set = tree<T,null_type,less<T>,rb_tree_tag,tree_order_statistics_node_update>;
//change null_type to get ordered_map
#define N  200001
int tme[2];
vi a,b,c,ht;
vector <bool> vis;
vi intt[2],outt[2];
vector <vi> v;
void dfs(int node,int dep){
	vis[node]=true;
	ht[node]=dep;
	if(dep%2){
		a[tme[1]]=c[node];
	}
	else{
		b[tme[0]]=c[node];
	}
	rep(i,0,2){
		intt[i][node]=tme[i];
	}
	tme[dep%2]++;
	for(auto i:v[node]){
		if(!vis[i]){
			dfs(i,dep+1);
		}
	}
	rep(i,0,2){
		outt[i][node]=tme[i];
	}
}
vi seg[2],lazy[2];
void build(int node,int start,int end,int flag){
    if(start==end){
    	if(flag)
	        seg[flag][node]=a[start];
    	else
    		seg[flag][node]=b[start];
        return;
    }
    int mid=(start+end)>>1;
    build(node<<1,start,mid,flag);
    build(node<<1|1,mid+1,end,flag);
    seg[flag][node]=seg[flag][node<<1]+seg[flag][node<<1|1];
}
void update(int node,int start,int end,int l,int r,int val,int flag){
    if(lazy[flag][node]!=0){
        seg[flag][node]+=(end-start+1)*lazy[flag][node];
        if(start!=end){
            lazy[flag][node<<1]+=lazy[flag][node];
            lazy[flag][node<<1|1]+=lazy[flag][node];
        }
        lazy[flag][node]=0;
    }
    if(start>end || start>r || end<l) return;
    if(l<=start && end<=r){
        seg[flag][node]+=(end-start+1)*val;
        if(start!=end){
            lazy[flag][node<<1]+=val;
            lazy[flag][node<<1|1]+=val;
        }
        return;
    }
    int mid=(start+end)>>1;
    update(node<<1,start,mid,l,r,val,flag);
    update(node<<1|1,mid+1,end,l,r,val,flag);
    seg[flag][node]=seg[flag][node<<1]+seg[flag][node<<1|1];
}
lld query(int node,int start,int end,int l,int r,int flag){
    if(start>end || start>r || end<l) return 0;
    if(lazy[flag][node]!=0){
        seg[flag][node]+=(end-start+1)*lazy[flag][node];
        if(start!=end){
            lazy[flag][node<<1]+=lazy[flag][node];
            lazy[flag][node<<1|1]+=lazy[flag][node];
        }
        lazy[flag][node]=0;
    }
    if(start>=l && end<=r) return seg[flag][node];
    int mid=(start+end)>>1;
    lld q1=query(node<<1,start,mid,l,r,flag);
    lld q2=query(node<<1|1,mid+1,end,l,r,flag);
    return q1+q2;
}
void solve()
{
	int n,m;
	cin >> n >> m;
	v.resize(n+1);
	c.resize(n+1);
	vis.resize(n+1);
	ht.resize(n+1);
	a.resize(n+1);
	b.resize(n+1);
	rep(i,1,n+1){
		cin >> c[i];
	}
	rep(i,1,n){
		lld x,y;
		cin >> x >> y;
		v[x].pb(y),v[y].pb(x);
	}
	rep(i,0,2){
		intt[i].resize(n+1);
		outt[i].resize(n+1);
	}
	dfs(1,0);
	rep(i,1,n+1){
		v[i].clear();
	}
	c.clear();
	v.clear();
	rep(i,0,2){
		seg[i].resize(4*tme[i]+1);
		lazy[i].resize(4*tme[i]+1);
	}
	rep(i,0,2){
		build(1,0,tme[i]-1,i);
	}
	rep(i,0,m){
		int ty;
		cin >> ty;
		if(ty==1){
			int x,val;
			cin >> x >> val;
			int r=ht[x]%2;
			if(intt[r][x]<=outt[r][x]-1)
				update(1,0,tme[r]-1,intt[r][x],outt[r][x]-1,val,r);
			if(intt[1^r][x]<=outt[1^r][x]-1)
				update(1,0,tme[r^1]-1,intt[1^r][x],outt[1^r][x]-1,-val,1^r);
		}
		else{
			int x;
			cin >> x;
			int r=ht[x]%2;
			lld ans;
			if(r){
				cout << query(1,0,tme[1]-1,intt[1][x],intt[1][x],1) << endl;
			}
			else{
				cout << query(1,0,tme[0]-1,intt[0][x],intt[0][x],0) << endl;
			}
		}
	}
}
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	int tests=1;
	//cin>>tests;
	while(tests--)
	{
		solve();
	}
}


/*input
5 5
1 2 1 1 2
1 2
1 3
2 4
2 5
1 2 3
1 1 2
2 1
2 2
2 4

*/
/*

**************************
*						 *
* AUTHOR :: knight_coder *
*						 *
**************************

*/
#include<bits/stdc++.h>
#define lld         int
#define pb          push_back
#define ppb         pop_back
#define	endl		'\n'
#define mii         map<lld,lld>
#define msi         map<string,lld>
#define mis         map<lld, string>
#define mpi         map<pair<lld ,lld >,lld >
#define pii         pair<lld,lld>
#define vi          vector<int>
#define vpi 		vector<pii>
#define vs          vector<string>
#define all(a)      (a).begin(),(a).end()
#define F           first
#define S           second
#define sz(x)       (lld)x.size()
#define hell        1000000007
#define rrep(i,m,n)	for(lld i=m;i>=n;i--)
#define rep(i,m,n)	for(lld i=m;i<n;i++)
#define lbnd        lower_bound
#define ubnd        upper_bound
#define bs          binary_search
#define mp          make_pair
#define what_is(x)  cerr << #x << " is " << x << endl;
#define pr(x) 		cout<< x << " ";
#define pre(x)		cout<< x << endl ;
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
template<typename T>
using ordered_set = tree<T,null_type,less<T>,rb_tree_tag,tree_order_statistics_node_update>;
//change null_type to get ordered_map
#define N  200005
int tme[2];
int a[N],b[N];
bool vis[N];
int ht[N];
int intt[N][2],outt[N][2];
vi c;
vector <vi> v;
void inii(){
	rep(i,0,N){
		a[i]=0,b[i]=0;
		vis[i]=false;
		ht[i]=0;
	}
}
void dfs(int node,int dep){
	vis[node]=true;
	ht[node]=dep;
	if(dep%2){
		a[tme[1]]=c[node];
	}
	else{
		b[tme[0]]=c[node];
	}
	rep(i,0,2){
		intt[node][i]=tme[i];
	}
	tme[dep%2]++;
	for(auto i:v[node]){
		if(!vis[i]){
			dfs(i,dep+1);
		}
	}
	rep(i,0,2){
		outt[node][i]=tme[i];
	}
}
vi seg[2],lazy[2];
void build(int node,int start,int end,int flag){
    if(start==end){
    	if(flag)
	        seg[flag][node]=a[start];
    	else
    		seg[flag][node]=b[start];
        return;
    }
    int mid=(start+end)>>1;
    build(node<<1,start,mid,flag);
    build(node<<1|1,mid+1,end,flag);
    seg[flag][node]=seg[flag][node<<1]+seg[flag][node<<1|1];
}
void update(int node,int start,int end,int l,int r,int val,int flag){
    if(lazy[flag][node]!=0){
        seg[flag][node]+=(end-start+1)*lazy[flag][node];
        if(start!=end){
            lazy[flag][node<<1]+=lazy[flag][node];
            lazy[flag][node<<1|1]+=lazy[flag][node];
        }
        lazy[flag][node]=0;
    }
    if(start>end || start>r || end<l) return;
    if(l<=start && end<=r){
        seg[flag][node]+=(end-start+1)*val;
        if(start!=end){
            lazy[flag][node<<1]+=val;
            lazy[flag][node<<1|1]+=val;
        }
        return;
    }
    int mid=(start+end)>>1;
    update(node<<1,start,mid,l,r,val,flag);
    update(node<<1|1,mid+1,end,l,r,val,flag);
    seg[flag][node]=seg[flag][node<<1]+seg[flag][node<<1|1];
}
lld query(int node,int start,int end,int l,int r,int flag){
    if(start>end || start>r || end<l) return 0;
    if(lazy[flag][node]!=0){
        seg[flag][node]+=(end-start+1)*lazy[flag][node];
        if(start!=end){
            lazy[flag][node<<1]+=lazy[flag][node];
            lazy[flag][node<<1|1]+=lazy[flag][node];
        }
        lazy[flag][node]=0;
    }
    if(start>=l && end<=r) return seg[flag][node];
    int mid=(start+end)>>1;
    lld q1=query(node<<1,start,mid,l,r,flag);
    lld q2=query(node<<1|1,mid+1,end,l,r,flag);
    return q1+q2;
}
void solve()
{
	inii();
	int n,m;
	cin >> n >> m;
	v.resize(n+1);
	c.resize(n+1);
	rep(i,1,n+1){
		cin >> c[i];
	}
	rep(i,1,n){
		lld x,y;
		cin >> x >> y;
		v[x].pb(y),v[y].pb(x);
	}
	dfs(1,0);
	rep(i,1,n+1){
		v[i].clear();
	}
	c.clear();
	v.clear();
	rep(i,0,2){
		seg[i].resize(4*tme[i]+1);
		lazy[i].resize(4*tme[i]+1);
	}
	rep(i,0,2){
		build(1,0,tme[i]-1,i);
	}
	rep(i,0,m){
		int ty;
		cin >> ty;
		if(ty==1){
			int x,val;
			cin >> x >> val;
			int r=ht[x]%2;
			if(intt[x][r]<=outt[x][r]-1)
				update(1,0,tme[r]-1,intt[x][r],outt[x][r]-1,val,r);
			if(intt[x][1^r]<=outt[x][1^r]-1)
				update(1,0,tme[r^1]-1,intt[x][1^r],outt[x][1^r]-1,-val,1^r);
		}
		else{
			int x;
			cin >> x;
			int r=ht[x]%2;
			lld ans;
			if(r){
				cout << query(1,0,tme[1]-1,intt[x][1],intt[x][1],1) << endl;
			}
			else{
				cout << query(1,0,tme[0]-1,intt[x][0],intt[x][0],0) << endl;
			}
		}
	}
}
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	int tests=1;
	//cin>>tests;
	while(tests--)
	{
		solve();
	}
}


/*input
5 5
1 2 1 1 2
1 2
1 3
2 4
2 5
1 2 3
1 1 2
2 1
2 2
2 4

*/
/*

**************************
*						 *
* AUTHOR :: knight_coder *
*						 *
**************************

*/
#include<bits/stdc++.h>
#define lld         int
#define pb          push_back
#define ppb         pop_back
#define	endl		'\n'
#define mii         map<lld,lld>
#define msi         map<string,lld>
#define mis         map<lld, string>
#define mpi         map<pair<lld ,lld >,lld >
#define pii         pair<lld,lld>
#define vi          vector<int>
#define vpi 		vector<pii>
#define vs          vector<string>
#define all(a)      (a).begin(),(a).end()
#define F           first
#define S           second
#define sz(x)       (lld)x.size()
#define hell        1000000007
#define rrep(i,m,n)	for(lld i=m;i>=n;i--)
#define rep(i,m,n)	for(lld i=m;i<n;i++)
#define lbnd        lower_bound
#define ubnd        upper_bound
#define bs          binary_search
#define mp          make_pair
#define what_is(x)  cerr << #x << " is " << x << endl;
#define pr(x) 		cout<< x << " ";
#define pre(x)		cout<< x << endl ;
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
template<typename T>
using ordered_set = tree<T,null_type,less<T>,rb_tree_tag,tree_order_statistics_node_update>;
//change null_type to get ordered_map
#define N  200001
int tme[2];
int a[N],b[N];
bool vis[N];
int ht[N];
vi intt[2],outt[2];
vi c;
vector <vi> v;
void inii(){
	rep(i,0,N){
		a[i]=0,b[i]=0;
		vis[i]=false;
		ht[i]=0;
	}
}
void dfs(int node,int dep){
	vis[node]=true;
	ht[node]=dep;
	if(dep%2){
		a[tme[1]]=c[node];
	}
	else{
		b[tme[0]]=c[node];
	}
	rep(i,0,2){
		intt[i][node]=tme[i];
	}
	tme[dep%2]++;
	for(auto i:v[node]){
		if(!vis[i]){
			dfs(i,dep+1);
		}
	}
	rep(i,0,2){
		outt[i][node]=tme[i];
	}
}
vi seg[2],lazy[2];
void build(int node,int start,int end,int flag){
    if(start==end){
    	if(flag)
	        seg[flag][node]=a[start];
    	else
    		seg[flag][node]=b[start];
        return;
    }
    int mid=(start+end)>>1;
    build(node<<1,start,mid,flag);
    build(node<<1|1,mid+1,end,flag);
    seg[flag][node]=seg[flag][node<<1]+seg[flag][node<<1|1];
}
void update(int node,int start,int end,int l,int r,int val,int flag){
    if(lazy[flag][node]!=0){
        seg[flag][node]+=(end-start+1)*lazy[flag][node];
        if(start!=end){
            lazy[flag][node<<1]+=lazy[flag][node];
            lazy[flag][node<<1|1]+=lazy[flag][node];
        }
        lazy[flag][node]=0;
    }
    if(start>end || start>r || end<l) return;
    if(l<=start && end<=r){
        seg[flag][node]+=(end-start+1)*val;
        if(start!=end){
            lazy[flag][node<<1]+=val;
            lazy[flag][node<<1|1]+=val;
        }
        return;
    }
    int mid=(start+end)>>1;
    update(node<<1,start,mid,l,r,val,flag);
    update(node<<1|1,mid+1,end,l,r,val,flag);
    seg[flag][node]=seg[flag][node<<1]+seg[flag][node<<1|1];
}
lld query(int node,int start,int end,int l,int r,int flag){
    if(start>end || start>r || end<l) return 0;
    if(lazy[flag][node]!=0){
        seg[flag][node]+=(end-start+1)*lazy[flag][node];
        if(start!=end){
            lazy[flag][node<<1]+=lazy[flag][node];
            lazy[flag][node<<1|1]+=lazy[flag][node];
        }
        lazy[flag][node]=0;
    }
    if(start>=l && end<=r) return seg[flag][node];
    int mid=(start+end)>>1;
    lld q1=query(node<<1,start,mid,l,r,flag);
    lld q2=query(node<<1|1,mid+1,end,l,r,flag);
    return q1+q2;
}
void solve()
{
	inii();
	int n,m;
	cin >> n >> m;
	v.resize(n+1);
	c.resize(n+1);
	rep(i,1,n+1){
		cin >> c[i];
	}
	rep(i,1,n){
		lld x,y;
		cin >> x >> y;
		v[x].pb(y),v[y].pb(x);
	}
	rep(i,0,2){
		intt[i].resize(n+1);
		outt[i].resize(n+1);
	}
	dfs(1,0);
	rep(i,1,n+1){
		v[i].clear();
	}
	c.clear();
	v.clear();
	rep(i,0,2){
		seg[i].resize(4*tme[i]+1);
		lazy[i].resize(4*tme[i]+1);
	}
	rep(i,0,2){
		build(1,0,tme[i]-1,i);
	}
	rep(i,0,m){
		int ty;
		cin >> ty;
		if(ty==1){
			int x,val;
			cin >> x >> val;
			int r=ht[x]%2;
			if(intt[r][x]<=outt[r][x]-1)
				update(1,0,tme[r]-1,intt[r][x],outt[r][x]-1,val,r);
			if(intt[1^r][x]<=outt[1^r][x]-1)
				update(1,0,tme[r^1]-1,intt[1^r][x],outt[1^r][x]-1,-val,1^r);
		}
		else{
			int x;
			cin >> x;
			int r=ht[x]%2;
			lld ans;
			if(r){
				cout << query(1,0,tme[1]-1,intt[1][x],intt[1][x],1) << endl;
			}
			else{
				cout << query(1,0,tme[0]-1,intt[0][x],intt[0][x],0) << endl;
			}
		}
	}
}
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	int tests=1;
	//cin>>tests;
	while(tests--)
	{
		solve();
	}
}


/*input
5 5
1 2 1 1 2
1 2
1 3
2 4
2 5
1 2 3
1 1 2
2 1
2 2
2 4

*/
/*

**************************
*						 *
* AUTHOR :: knight_coder *
*						 *
**************************

*/
#include<bits/stdc++.h>
#define lld         int
#define pb          push_back
#define ppb         pop_back
#define	endl		'\n'
#define mii         map<lld,lld>
#define msi         map<string,lld>
#define mis         map<lld, string>
#define mpi         map<pair<lld ,lld >,lld >
#define pii         pair<lld,lld>
#define vi          vector<int>
#define vpi 		vector<pii>
#define vs          vector<string>
#define all(a)      (a).begin(),(a).end()
#define F           first
#define S           second
#define sz(x)       (lld)x.size()
#define hell        1000000007
#define rrep(i,m,n)	for(lld i=m;i>=n;i--)
#define rep(i,m,n)	for(lld i=m;i<n;i++)
#define lbnd        lower_bound
#define ubnd        upper_bound
#define bs          binary_search
#define mp          make_pair
#define what_is(x)  cerr << #x << " is " << x << endl;
#define pr(x) 		cout<< x << " ";
#define pre(x)		cout<< x << endl ;
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
template<typename T>
using ordered_set = tree<T,null_type,less<T>,rb_tree_tag,tree_order_statistics_node_update>;
//change null_type to get ordered_map
#define N  200005
int tme[2];
int b[N],a[N];
bool vis[N];
int ht[N];
int intt[N][2],outt[N][2];
int c[N];
vi v[N];
void inii(){
	rep(i,0,N){
		a[i]=0,b[i]=0;
		vis[i]=false;
		ht[i]=0;
	}
}
void dfs(int node,int dep){
	vis[node]=true;
	ht[node]=dep;
	if(dep%2){
		a[tme[1]]=c[node];
	}
	else{
		b[tme[0]]=c[node];
	}
	rep(i,0,2){
		intt[node][i]=tme[i];
	}
	tme[dep%2]++;
	for(auto i:v[node]){
		if(!vis[i]){
			dfs(i,dep+1);
		}
	}
	rep(i,0,2){
		outt[node][i]=tme[i];
	}
}
vi seg[2],lazy[2];
void build(int node,int start,int end,int flag){
    if(start==end){
    	if(flag)
	        seg[flag][node]=a[start];
    	else
    		seg[flag][node]=b[start];
        return;
    }
    int mid=(start+end)>>1;
    build(node<<1,start,mid,flag);
    build(node<<1|1,mid+1,end,flag);
    seg[flag][node]=seg[flag][node<<1]+seg[flag][node<<1|1];
}
void update(int node,int start,int end,int l,int r,int val,int flag){
    if(lazy[flag][node]!=0){
        seg[flag][node]+=(end-start+1)*lazy[flag][node];
        if(start!=end){
            lazy[flag][node<<1]+=lazy[flag][node];
            lazy[flag][node<<1|1]+=lazy[flag][node];
        }
        lazy[flag][node]=0;
    }
    if(start>end || start>r || end<l) return;
    if(l<=start && end<=r){
        seg[flag][node]+=(end-start+1)*val;
        if(start!=end){
            lazy[flag][node<<1]+=val;
            lazy[flag][node<<1|1]+=val;
        }
        return;
    }
    int mid=(start+end)>>1;
    update(node<<1,start,mid,l,r,val,flag);
    update(node<<1|1,mid+1,end,l,r,val,flag);
    seg[flag][node]=seg[flag][node<<1]+seg[flag][node<<1|1];
}
lld query(int node,int start,int end,int l,int r,int flag){
    if(start>end || start>r || end<l) return 0;
    if(lazy[flag][node]!=0){
        seg[flag][node]+=(end-start+1)*lazy[flag][node];
        if(start!=end){
            lazy[flag][node<<1]+=lazy[flag][node];
            lazy[flag][node<<1|1]+=lazy[flag][node];
        }
        lazy[flag][node]=0;
    }
    if(start>=l && end<=r) return seg[flag][node];
    int mid=(start+end)>>1;
    lld q1=query(node<<1,start,mid,l,r,flag);
    lld q2=query(node<<1|1,mid+1,end,l,r,flag);
    return q1+q2;
}
void solve()
{
	inii();
	int n,m;
	cin >> n >> m;
	rep(i,1,n+1){
		cin >> c[i];
	}
	rep(i,1,n){
		lld x,y;
		cin >> x >> y;
		v[x].pb(y),v[y].pb(x);
	}
	dfs(1,0);
	rep(i,0,2){
		seg[i].resize(4*tme[i]+4);
		lazy[i].resize(4*tme[i]+4);
	}
	rep(i,0,2){
		build(1,0,tme[i]-1,i);
	}
	rep(i,0,m){
		int ty;
		cin >> ty;
		if(ty==1){
			int x,val;
			cin >> x >> val;
			int r=ht[x]%2;
			if(intt[x][r]<=outt[x][r]-1)
				update(1,0,tme[r]-1,intt[x][r],outt[x][r]-1,val,r);
			if(intt[x][1^r]<=outt[x][1^r]-1)
				update(1,0,tme[r^1]-1,intt[x][1^r],outt[x][1^r]-1,-val,1^r);
		}
		else{
			int x;
			cin >> x;
			int r=ht[x]%2;
			lld ans;
			if(r){
				ans=query(1,0,tme[1]-1,intt[x][1],intt[x][1],1);
			}
			else{
				ans=query(1,0,tme[0]-1,intt[x][0],intt[x][0],0);
			}
			cout << ans << endl;
		}
	}
}
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	int tests=1;
	//cin>>tests;
	while(tests--)
	{
		solve();
	}
}


/*input
5 5
1 2 1 1 2
1 2
1 3
2 4
2 5
1 2 3
1 1 2
2 1
2 2
2 4
*/
/*

**************************
*						 *
* AUTHOR :: knight_coder *
*						 *
**************************

*/
#include<bits/stdc++.h>
#define lld         int
#define pb          push_back
#define ppb         pop_back
#define	endl		'\n'
#define mii         map<lld,lld>
#define msi         map<string,lld>
#define mis         map<lld, string>
#define mpi         map<pair<lld ,lld >,lld >
#define pii         pair<lld,lld>
#define vi          vector<int>
#define vpi 		vector<pii>
#define vs          vector<string>
#define all(a)      (a).begin(),(a).end()
#define F           first
#define S           second
#define sz(x)       (lld)x.size()
#define hell        1000000007
#define rrep(i,m,n)	for(lld i=m;i>=n;i--)
#define rep(i,m,n)	for(lld i=m;i<n;i++)
#define lbnd        lower_bound
#define ubnd        upper_bound
#define bs          binary_search
#define mp          make_pair
#define what_is(x)  cerr << #x << " is " << x << endl;
#define pr(x) 		cout<< x << " ";
#define pre(x)		cout<< x << endl ;
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
template<typename T>
using ordered_set = tree<T,null_type,less<T>,rb_tree_tag,tree_order_statistics_node_update>;
//change null_type to get ordered_map
#define N  200001
int tme[2];
vi a,b,c,ht;
vector <bool> vis;
vi intt[2],outt[2];
vector <vi> v;
void dfs(int node,int dep){
	vis[node]=true;
	ht[node]=dep;
	if(dep%2){
		a[tme[1]]=c[node];
	}
	else{
		b[tme[0]]=c[node];
	}
	rep(i,0,2){
		intt[i][node]=tme[i];
	}
	tme[dep%2]++;
	for(auto i:v[node]){
		if(!vis[i]){
			dfs(i,dep+1);
		}
	}
	rep(i,0,2){
		outt[i][node]=tme[i];
	}
}
vi seg[2],lazy[2];
void build(int node,int start,int end,int flag){
    if(start==end){
    	if(flag)
	        seg[flag][node]=a[start];
    	else
    		seg[flag][node]=b[start];
        return;
    }
    int mid=(start+end)>>1;
    build(node<<1,start,mid,flag);
    build(node<<1|1,mid+1,end,flag);
    seg[flag][node]=seg[flag][node<<1]+seg[flag][node<<1|1];
}
void update(int node,int start,int end,int l,int r,int val,int flag){
    if(lazy[flag][node]!=0){
        seg[flag][node]+=(end-start+1)*lazy[flag][node];
        if(start!=end){
            lazy[flag][node<<1]+=lazy[flag][node];
            lazy[flag][node<<1|1]+=lazy[flag][node];
        }
        lazy[flag][node]=0;
    }
    if(start>end || start>r || end<l) return;
    if(l<=start && end<=r){
        seg[flag][node]+=(end-start+1)*val;
        if(start!=end){
            lazy[flag][node<<1]+=val;
            lazy[flag][node<<1|1]+=val;
        }
        return;
    }
    int mid=(start+end)>>1;
    update(node<<1,start,mid,l,r,val,flag);
    update(node<<1|1,mid+1,end,l,r,val,flag);
    seg[flag][node]=seg[flag][node<<1]+seg[flag][node<<1|1];
}
lld query(int node,int start,int end,int l,int r,int flag){
    if(start>end || start>r || end<l) return 0;
    if(lazy[flag][node]!=0){
        seg[flag][node]+=(end-start+1)*lazy[flag][node];
        if(start!=end){
            lazy[flag][node<<1]+=lazy[flag][node];
            lazy[flag][node<<1|1]+=lazy[flag][node];
        }
        lazy[flag][node]=0;
    }
    if(start>=l && end<=r) return seg[flag][node];
    int mid=(start+end)>>1;
    lld q1=query(node<<1,start,mid,l,r,flag);
    lld q2=query(node<<1|1,mid+1,end,l,r,flag);
    return q1+q2;
}
void solve()
{
	int n,m;
	cin >> n >> m;
	v.resize(n+4);
	c.resize(n+4);
	vis.resize(n+4);
	ht.resize(n+4);
	a.resize(n+4);
	b.resize(n+4);
	rep(i,1,n+1){
		cin >> c[i];
	}
	rep(i,1,n){
		lld x,y;
		cin >> x >> y;
		v[x].pb(y),v[y].pb(x);
	}
	rep(i,0,2){
		intt[i].resize(n+4);
		outt[i].resize(n+4);
	}
	dfs(1,0);
	rep(i,1,n+1){
		v[i].clear();
	}
	c.clear();
	v.clear();
	rep(i,0,2){
		seg[i].resize(4*tme[i]+4);
		lazy[i].resize(4*tme[i]+4);
	}
	rep(i,0,2){
		if(tme[i]>=1)
			build(1,0,tme[i],i);
	}
	rep(i,0,m){
		int ty;
		cin >> ty;
		if(ty==1){
			int x,val;
			cin >> x >> val;
			int r=ht[x]%2;
			if(intt[r][x]<=outt[r][x]-1)
				update(1,0,tme[r],intt[r][x],outt[r][x]-1,val,r);
			if(intt[1^r][x]<=outt[1^r][x]-1)
				update(1,0,tme[r^1],intt[1^r][x],outt[1^r][x]-1,-val,1^r);
		}
		else{
			int x;
			cin >> x;
			int r=ht[x]%2;
			lld ans;
			if(r){
				cout << query(1,0,tme[1],intt[1][x],intt[1][x],1) << endl;
			}
			else{
				cout << query(1,0,tme[0],intt[0][x],intt[0][x],0) << endl;
			}
		}
	}
}
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	int tests=1;
	//cin>>tests;
	while(tests--)
	{
		solve();
	}
}


/*input
5 5
1 2 1 1 2
1 2
1 3
2 4
2 5
1 2 3
1 1 2
2 1
2 2
2 4

*/
/*

**************************
*						 *
* AUTHOR :: knight_coder *
*						 *
**************************

*/
#include<bits/stdc++.h>
#define lld          long long int
#define pb          push_back
#define ppb         pop_back
#define	endl		'\n'
#define mii         map<lld,lld>
#define msi         map<string,lld>
#define mis         map<lld, string>
#define mpi         map<pair<lld ,lld >,lld >
#define pii         pair<lld,lld>
#define vi          vector<lld>
#define vpi 		vector<pii>
#define vs          vector<string>
#define all(a)      (a).begin(),(a).end()
#define F           first
#define S           second
#define sz(x)       (lld)x.size()
#define hell        1000000007
#define rrep(i,m,n)	for(lld i=m;i>=n;i--)
#define rep(i,m,n)	for(lld i=m;i<n;i++)
#define lbnd        lower_bound
#define ubnd        upper_bound
#define bs          binary_search
#define mp          make_pair
#define what_is(x)  cerr << #x << " is " << x << endl;
#define pr(x) 		cout<< x << " ";
#define pre(x)		cout<< x << endl ;
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
template<typename T>
using ordered_set = tree<T,null_type,less<T>,rb_tree_tag,tree_order_statistics_node_update>;
//change null_type to get ordered_map
#define N  200005
lld tme[2];
lld b[N],a[N];
bool vis[N];
lld ht[N];
lld intt[N][2],outt[N][2];
lld c[N];
vi v[N];
void inii(){
	rep(i,0,N){
		a[i]=0,b[i]=0;
		vis[i]=false;
		ht[i]=0;
	}
}
void dfs(lld node,lld dep){
	vis[node]=true;
	ht[node]=dep;
	if(dep%2){
		a[tme[1]]=c[node];
	}
	else{
		b[tme[0]]=c[node];
	}
	rep(i,0,2){
		intt[node][i]=tme[i];
	}
	tme[dep%2]++;
	for(auto i:v[node]){
		if(!vis[i]){
			dfs(i,dep+1);
		}
	}
	rep(i,0,2){
		outt[node][i]=tme[i];
	}
}
lld seg[4*N][2],lazy[4*N][2];
void build(lld node,lld start,lld end,lld flag){
    if(start==end){
    	if(flag)
	        seg[node][flag]=a[start];
    	else
    		seg[node][flag]=b[start];
        return;
    }
    lld mid=(start+end)>>1;
    build(node<<1,start,mid,flag);
    build(node<<1|1,mid+1,end,flag);
    seg[node][flag]=seg[node<<1][flag]+seg[node<<1|1][flag];
}
void update(lld node,lld start,lld end,lld l,lld r,lld val,lld flag){
    if(lazy[node][flag]!=0){
        seg[node][flag]+=(end-start+1)*lazy[node][flag];
        if(start!=end){
            lazy[node<<1][flag]+=lazy[node][flag];
            lazy[node<<1|1][flag]+=lazy[node][flag];
        }
        lazy[node][flag]=0;
    }
    if(start>end || start>r || end<l) return;
    if(l<=start && end<=r){
        seg[node][flag]+=(end-start+1)*val;
        if(start!=end){
            lazy[node<<1][flag]+=val;
            lazy[node<<1|1][flag]+=val;
        }
        return;
    }
    lld mid=(start+end)>>1;
    update(node<<1,start,mid,l,r,val,flag);
    update(node<<1|1,mid+1,end,l,r,val,flag);
    seg[node][flag]=seg[node<<1][flag]+seg[node<<1|1][flag];
}
lld query(lld node,lld start,lld end,lld l,lld r,lld flag){
    if(start>end || start>r || end<l) return 0;
    if(lazy[node][flag]!=0){
        seg[node][flag]+=(end-start+1)*lazy[node][flag];
        if(start!=end){
            lazy[node<<1][flag]+=lazy[node][flag];
            lazy[node<<1|1][flag]+=lazy[node][flag];
        }
        lazy[node][flag]=0;
    }
    if(start>=l && end<=r) return seg[node][flag];
    lld mid=(start+end)>>1;
    lld q1=query(node<<1,start,mid,l,r,flag);
    lld q2=query(node<<1|1,mid+1,end,l,r,flag);
    return q1+q2;
}
void solve()
{
	inii();
	lld n,m;
	cin >> n >> m;
	rep(i,1,n+1){
		cin >> c[i];
	}
	rep(i,1,n){
		lld x,y;
		cin >> x >> y;
		v[x].pb(y),v[y].pb(x);
	}
	dfs(1,0);
	rep(i,0,2){
		build(1,0,tme[i]-1,i);
	}
	// rep(i,1,n+1){
	// 	rep(j,0,2)
	// 		cout << intt[i][j] << ' ' << outt[i][j]-1 << ' ';
	// 	cout << endl;
	// }
	// cout << tme[1] << ' ' << tme[0] << ' ';
	// cout << "fu\n";
	// rep(i,0,tme[1]){
	// 	cout << a[i] << ' ';
	// }
	// cout << endl;
	// rep(i,0,tme[0]){
	// 	cout << b[i] << ' ';
	// }
	// cout << endl;
	// cout << "ck" << endl;
	rep(i,0,m){
		lld ty;
		cin >> ty;
		if(ty==1){
			lld x,val;
			cin >> x >> val;
			lld r=ht[x]%2;
			if(intt[x][r]<=outt[x][r]-1)
				update(1,0,tme[r]-1,intt[x][r],outt[x][r]-1,val,r);
			if(intt[x][1^r]<=outt[x][1^r]-1)
				update(1,0,tme[r^1]-1,intt[x][1^r],outt[x][1^r]-1,-val,1^r);
		}
		else{
			lld x;
			cin >> x;
			lld r=ht[x]%2;
			lld ans;
			if(r){
				ans=query(1,0,tme[1]-1,intt[x][1],intt[x][1],1);
			}
			else{
				ans=query(1,0,tme[0]-1,intt[x][0],intt[x][0],0);
			}
			cout << ans << endl;
		}
	}
}
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	int tests=1;
	//cin>>tests;
	while(tests--)
	{
		solve();
	}
}


/*input
5 5
1 2 1 1 2
1 2
1 3
2 4
2 5
1 2 3
1 1 2
2 1
2 2
2 4

*/
/*

**************************
*						 *
* AUTHOR :: knight_coder *
*						 *
**************************

*/
#include<bits/stdc++.h>
#define lld          long long int
#define pb          push_back
#define ppb         pop_back
#define	endl		'\n'
#define mii         map<lld,lld>
#define msi         map<string,lld>
#define mis         map<lld, string>
#define mpi         map<pair<lld ,lld >,lld >
#define pii         pair<lld,lld>
#define vi          vector<int>
#define vpi 		vector<pii>
#define vs          vector<string>
#define all(a)      (a).begin(),(a).end()
#define F           first
#define S           second
#define sz(x)       (lld)x.size()
#define hell        1000000007
#define rrep(i,m,n)	for(lld i=m;i>=n;i--)
#define rep(i,m,n)	for(lld i=m;i<n;i++)
#define lbnd        lower_bound
#define ubnd        upper_bound
#define bs          binary_search
#define mp          make_pair
#define what_is(x)  cerr << #x << " is " << x << endl;
#define pr(x) 		cout<< x << " ";
#define pre(x)		cout<< x << endl ;
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
template<typename T>
using ordered_set = tree<T,null_type,less<T>,rb_tree_tag,tree_order_statistics_node_update>;
//change null_type to get ordered_map
#define N  200005
int tme[2];
int b[N],a[N];
bool vis[N];
int ht[N];
int intt[N][2],outt[N][2];
int c[N];
vi v[N];
void inii(){
	rep(i,0,N){
		a[i]=0,b[i]=0;
		vis[i]=false;
		ht[i]=0;
	}
}
void dfs(int node,int dep){
	vis[node]=true;
	ht[node]=dep;
	if(dep%2){
		a[tme[1]]=c[node];
	}
	else{
		b[tme[0]]=c[node];
	}
	rep(i,0,2){
		intt[node][i]=tme[i];
	}
	tme[dep%2]++;
	for(auto i:v[node]){
		if(!vis[i]){
			dfs(i,dep+1);
		}
	}
	rep(i,0,2){
		outt[node][i]=tme[i];
	}
}
lld seg[4*N][2],lazy[4*N][2];
void build(int node,int start,int end,int flag){
    if(start==end){
    	if(flag)
	        seg[node][flag]=a[start];
    	else
    		seg[node][flag]=b[start];
        return;
    }
    int mid=(start+end)>>1;
    build(node<<1,start,mid,flag);
    build(node<<1|1,mid+1,end,flag);
    seg[node][flag]=seg[node<<1][flag]+seg[node<<1|1][flag];
}
void update(int node,int start,int end,int l,int r,int val,int flag){
    if(lazy[node][flag]!=0){
        seg[node][flag]+=(end-start+1)*lazy[node][flag];
        if(start!=end){
            lazy[node<<1][flag]+=lazy[node][flag];
            lazy[node<<1|1][flag]+=lazy[node][flag];
        }
        lazy[node][flag]=0;
    }
    if(start>end || start>r || end<l) return;
    if(l<=start && end<=r){
        seg[node][flag]+=(end-start+1)*val;
        if(start!=end){
            lazy[node<<1][flag]+=val;
            lazy[node<<1|1][flag]+=val;
        }
        return;
    }
    int mid=(start+end)>>1;
    update(node<<1,start,mid,l,r,val,flag);
    update(node<<1|1,mid+1,end,l,r,val,flag);
    seg[node][flag]=seg[node<<1][flag]+seg[node<<1|1][flag];
}
lld query(int node,int start,int end,int l,int r,int flag){
    if(start>end || start>r || end<l) return 0;
    if(lazy[node][flag]!=0){
        seg[node][flag]+=(end-start+1)*lazy[node][flag];
        if(start!=end){
            lazy[node<<1][flag]+=lazy[node][flag];
            lazy[node<<1|1][flag]+=lazy[node][flag];
        }
        lazy[node][flag]=0;
    }
    if(start>=l && end<=r) return seg[node][flag];
    int mid=(start+end)>>1;
    lld q1=query(node<<1,start,mid,l,r,flag);
    lld q2=query(node<<1|1,mid+1,end,l,r,flag);
    return q1+q2;
}
void solve()
{
	inii();
	int n,m;
	cin >> n >> m;
	rep(i,1,n+1){
		cin >> c[i];
	}
	rep(i,1,n){
		lld x,y;
		cin >> x >> y;
		v[x].pb(y),v[y].pb(x);
	}
	dfs(1,0);
	rep(i,0,2){
		build(1,0,tme[i]-1,i);
	}
	rep(i,0,m){
		int ty;
		cin >> ty;
		if(ty==1){
			int x,val;
			cin >> x >> val;
			int r=ht[x]%2;
			if(intt[x][r]<=outt[x][r]-1)
				update(1,0,tme[r]-1,intt[x][r],outt[x][r]-1,val,r);
			if(intt[x][1^r]<=outt[x][1^r]-1)
				update(1,0,tme[r^1]-1,intt[x][1^r],outt[x][1^r]-1,-val,1^r);
		}
		else{
			int x;
			cin >> x;
			int r=ht[x]%2;
			lld ans;
			if(r){
				ans=query(1,0,tme[1]-1,intt[x][1],intt[x][1],1);
			}
			else{
				ans=query(1,0,tme[0]-1,intt[x][0],intt[x][0],0);
			}
			cout << ans << endl;
		}
	}
}
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	int tests=1;
	//cin>>tests;
	while(tests--)
	{
		solve();
	}
}


/*input
5 5
1 2 1 1 2
1 2
1 3
2 4
2 5
1 2 3
1 1 2
2 1
2 2
2 4

*/
/*

**************************
*						 *
* AUTHOR :: knight_coder *
*						 *
**************************

*/
#include<bits/stdc++.h>
#define lld         int
#define pb          push_back
#define ppb         pop_back
#define	endl		'\n'
#define mii         map<lld,lld>
#define msi         map<string,lld>
#define mis         map<lld, string>
#define mpi         map<pair<lld ,lld >,lld >
#define pii         pair<lld,lld>
#define vi          vector<int>
#define vpi 		vector<pii>
#define vs          vector<string>
#define all(a)      (a).begin(),(a).end()
#define F           first
#define S           second
#define sz(x)       (lld)x.size()
#define hell        1000000007
#define rrep(i,m,n)	for(lld i=m;i>=n;i--)
#define rep(i,m,n)	for(lld i=m;i<n;i++)
#define lbnd        lower_bound
#define ubnd        upper_bound
#define bs          binary_search
#define mp          make_pair
#define what_is(x)  cerr << #x << " is " << x << endl;
#define pr(x) 		cout<< x << " ";
#define pre(x)		cout<< x << endl ;
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
template<typename T>
using ordered_set = tree<T,null_type,less<T>,rb_tree_tag,tree_order_statistics_node_update>;
//change null_type to get ordered_map
#define N  200005
int tme[2];
int a[N],b[N];
bool vis[N];
int ht[N];
int intt[N][2],outt[N][2];
vi c;
vi v[N];
void inii(){
	rep(i,0,N){
		a[i]=0,b[i]=0;
		vis[i]=false;
		ht[i]=0;
	}
}
void dfs(int node,int dep){
	vis[node]=true;
	ht[node]=dep;
	if(dep%2){
		a[tme[1]]=c[node];
	}
	else{
		b[tme[0]]=c[node];
	}
	rep(i,0,2){
		intt[node][i]=tme[i];
	}
	tme[dep%2]++;
	for(auto i:v[node]){
		if(!vis[i]){
			dfs(i,dep+1);
		}
	}
	rep(i,0,2){
		outt[node][i]=tme[i];
	}
}
vi seg[2],lazy[2];
void build(int node,int start,int end,int flag){
    if(start==end){
    	if(flag)
	        seg[flag][node]=a[start];
    	else
    		seg[flag][node]=b[start];
        return;
    }
    int mid=(start+end)>>1;
    build(node<<1,start,mid,flag);
    build(node<<1|1,mid+1,end,flag);
    seg[flag][node]=seg[flag][node<<1]+seg[flag][node<<1|1];
}
void update(int node,int start,int end,int l,int r,int val,int flag){
    if(lazy[flag][node]!=0){
        seg[flag][node]+=(end-start+1)*lazy[flag][node];
        if(start!=end){
            lazy[flag][node<<1]+=lazy[flag][node];
            lazy[flag][node<<1|1]+=lazy[flag][node];
        }
        lazy[flag][node]=0;
    }
    if(start>end || start>r || end<l) return;
    if(l<=start && end<=r){
        seg[flag][node]+=(end-start+1)*val;
        if(start!=end){
            lazy[flag][node<<1]+=val;
            lazy[flag][node<<1|1]+=val;
        }
        return;
    }
    int mid=(start+end)>>1;
    update(node<<1,start,mid,l,r,val,flag);
    update(node<<1|1,mid+1,end,l,r,val,flag);
    seg[flag][node]=seg[flag][node<<1]+seg[flag][node<<1|1];
}
lld query(int node,int start,int end,int l,int r,int flag){
    if(start>end || start>r || end<l) return 0;
    if(lazy[flag][node]!=0){
        seg[flag][node]+=(end-start+1)*lazy[flag][node];
        if(start!=end){
            lazy[flag][node<<1]+=lazy[flag][node];
            lazy[flag][node<<1|1]+=lazy[flag][node];
        }
        lazy[flag][node]=0;
    }
    if(start>=l && end<=r) return seg[flag][node];
    int mid=(start+end)>>1;
    lld q1=query(node<<1,start,mid,l,r,flag);
    lld q2=query(node<<1|1,mid+1,end,l,r,flag);
    return q1+q2;
}
void solve()
{
	inii();
	int n,m;
	cin >> n >> m;
	c.resize(n+1);
	rep(i,1,n+1){
		cin >> c[i];
	}
	rep(i,1,n){
		lld x,y;
		cin >> x >> y;
		v[x].pb(y),v[y].pb(x);
	}
	dfs(1,0);
	rep(i,0,2){
		seg[i].resize(2*tme[i]+4);
		lazy[i].resize(2*tme[i]+4);
	}
	rep(i,0,2){
		build(1,0,tme[i]-1,i);
	}
	rep(i,0,m){
		int ty;
		cin >> ty;
		if(ty==1){
			int x,val;
			cin >> x >> val;
			int r=ht[x]%2;
			if(intt[x][r]<=outt[x][r]-1)
				update(1,0,tme[r]-1,intt[x][r],outt[x][r]-1,val,r);
			if(intt[x][1^r]<=outt[x][1^r]-1)
				update(1,0,tme[r^1]-1,intt[x][1^r],outt[x][1^r]-1,-val,1^r);
		}
		else{
			int x;
			cin >> x;
			int r=ht[x]%2;
			lld ans;
			if(r){
				ans=query(1,0,tme[1]-1,intt[x][1],intt[x][1],1);
			}
			else{
				ans=query(1,0,tme[0]-1,intt[x][0],intt[x][0],0);
			}
			cout << ans << endl;
		}
	}
}
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	int tests=1;
	//cin>>tests;
	while(tests--)
	{
		solve();
	}
}


/*input
5 5
1 2 1 1 2
1 2
1 3
2 4
2 5
1 2 3
1 1 2
2 1
2 2
2 4

*/
/*

**************************
*						 *
* AUTHOR :: knight_coder *
*						 *
**************************

*/
#include<bits/stdc++.h>
#define lld          long long int
#define pb          push_back
#define ppb         pop_back
#define	endl		'\n'
#define mii         map<lld,lld>
#define msi         map<string,lld>
#define mis         map<lld, string>
#define mpi         map<pair<lld ,lld >,lld >
#define pii         pair<lld,lld>
#define vi          vector<lld>
#define vpi 		vector<pii>
#define vs          vector<string>
#define all(a)      (a).begin(),(a).end()
#define F           first
#define S           second
#define sz(x)       (lld)x.size()
#define hell        1000000007
#define rrep(i,m,n)	for(lld i=m;i>=n;i--)
#define rep(i,m,n)	for(lld i=m;i<n;i++)
#define lbnd        lower_bound
#define ubnd        upper_bound
#define bs          binary_search
#define mp          make_pair
#define what_is(x)  cerr << #x << " is " << x << endl;
#define pr(x) 		cout<< x << " ";
#define pre(x)		cout<< x << endl ;
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
template<typename T>
using ordered_set = tree<T,null_type,less<T>,rb_tree_tag,tree_order_statistics_node_update>;
//change null_type to get ordered_map
#define N  200005
lld tme[2];
lld b[N],a[N];
bool vis[N];
lld ht[N];
lld intt[N][2],outt[N][2];
lld c[N];
vi v[N];
void inii(){
	rep(i,0,N){
		a[i]=0,b[i]=0;
		vis[i]=false;
		ht[i]=0;
	}
}
void dfs(lld node,lld dep){
	vis[node]=true;
	ht[node]=dep;
	if(dep%2){
		a[tme[1]]=c[node];
	}
	else{
		b[tme[0]]=c[node];
	}
	rep(i,0,2){
		intt[node][i]=tme[i];
	}
	tme[dep%2]++;
	for(auto i:v[node]){
		if(!vis[i]){
			dfs(i,dep+1);
		}
	}
	rep(i,0,2){
		outt[node][i]=tme[i];
	}
}
lld seg[4*N][2],lazy[4*N][2];
void build(lld node,lld start,lld end,lld flag){
    if(start==end){
    	if(flag)
	        seg[node][flag]=a[start];
    	else
    		seg[node][flag]=b[start];
        return;
    }
    lld mid=(start+end)>>1;
    build(node<<1,start,mid,flag);
    build(node<<1|1,mid+1,end,flag);
    seg[node][flag]=seg[node<<1][flag]+seg[node<<1|1][flag];
}
void update(lld node,lld start,lld end,lld l,lld r,lld val,lld flag){
    if(lazy[node][flag]!=0){
        seg[node][flag]+=(end-start+1)*lazy[node][flag];
        if(start!=end){
            lazy[node<<1][flag]+=lazy[node][flag];
            lazy[node<<1|1][flag]+=lazy[node][flag];
        }
        lazy[node][flag]=0;
    }
    if(start>end || start>r || end<l) return;
    if(l<=start && end<=r){
        seg[node][flag]+=(end-start+1)*val;
        if(start!=end){
            lazy[node<<1][flag]+=val;
            lazy[node<<1|1][flag]+=val;
        }
        return;
    }
    lld mid=(start+end)>>1;
    update(node<<1,start,mid,l,r,val,flag);
    update(node<<1|1,mid+1,end,l,r,val,flag);
    seg[node][flag]=seg[node<<1][flag]+seg[node<<1|1][flag];
}
lld query(lld node,lld start,lld end,lld l,lld r,lld flag){
    if(start>end || start>r || end<l) return 0;
    if(lazy[node][flag]!=0){
        seg[node][flag]+=(end-start+1)*lazy[node][flag];
        if(start!=end){
            lazy[node<<1][flag]+=lazy[node][flag];
            lazy[node<<1|1][flag]+=lazy[node][flag];
        }
        lazy[node][flag]=0;
    }
    if(start>=l && end<=r) return seg[node][flag];
    lld mid=(start+end)>>1;
    lld q1=query(node<<1,start,mid,l,r,flag);
    lld q2=query(node<<1|1,mid+1,end,l,r,flag);
    return q1+q2;
}
void solve()
{
	inii();
	lld n,m;
	cin >> n >> m;
	rep(i,1,n+1){
		cin >> c[i];
	}
	rep(i,1,n){
		lld x,y;
		cin >> x >> y;
		v[x].pb(y),v[y].pb(x);
	}
	dfs(1,0);
	rep(i,0,2){
		build(1,0,tme[i],i);
	}
	// rep(i,1,n+1){
	// 	rep(j,0,2)
	// 		cout << intt[i][j] << ' ' << outt[i][j]-1 << ' ';
	// 	cout << endl;
	// }
	// cout << tme[1] << ' ' << tme[0] << ' ';
	// cout << "fu\n";
	// rep(i,0,tme[1]){
	// 	cout << a[i] << ' ';
	// }
	// cout << endl;
	// rep(i,0,tme[0]){
	// 	cout << b[i] << ' ';
	// }
	// cout << endl;
	// cout << "ck" << endl;
	rep(i,0,m){
		lld ty;
		cin >> ty;
		if(ty==1){
			lld x,val;
			cin >> x >> val;
			lld r=ht[x]%2;
			if(intt[x][r]<=outt[x][r]-1)
				update(1,0,tme[r],intt[x][r],outt[x][r]-1,val,r);
			if(intt[x][1^r]<=outt[x][1^r]-1)
				update(1,0,tme[r^1],intt[x][1^r],outt[x][1^r]-1,-val,1^r);
		}
		else{
			lld x;
			cin >> x;
			lld r=ht[x]%2;
			lld ans;
			if(r){
				ans=query(1,0,tme[1],intt[x][1],intt[x][1],1);
			}
			else{
				ans=query(1,0,tme[0],intt[x][0],intt[x][0],0);
			}
			cout << ans << endl;
		}
	}
}
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	int tests=1;
	//cin>>tests;
	while(tests--)
	{
		solve();
	}
}


/*input
5 5
1 2 1 1 2
1 2
1 3
2 4
2 5
1 2 3
1 1 2
2 1
2 2
2 4

*/
/*

**************************
*						 *
* AUTHOR :: knight_coder *
*						 *
**************************

*/
#include<bits/stdc++.h>
#define lld          long int
#define pb          push_back
#define ppb         pop_back
#define	endl		'\n'
#define mii         map<lld,lld>
#define msi         map<string,lld>
#define mis         map<lld, string>
#define mpi         map<pair<lld ,lld >,lld >
#define pii         pair<lld,lld>
#define vi          vector<int>
#define vpi 		vector<pii>
#define vs          vector<string>
#define all(a)      (a).begin(),(a).end()
#define F           first
#define S           second
#define sz(x)       (lld)x.size()
#define hell        1000000007
#define rrep(i,m,n)	for(lld i=m;i>=n;i--)
#define rep(i,m,n)	for(lld i=m;i<n;i++)
#define lbnd        lower_bound
#define ubnd        upper_bound
#define bs          binary_search
#define mp          make_pair
#define what_is(x)  cerr << #x << " is " << x << endl;
#define pr(x) 		cout<< x << " ";
#define pre(x)		cout<< x << endl ;
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
template<typename T>
using ordered_set = tree<T,null_type,less<T>,rb_tree_tag,tree_order_statistics_node_update>;
//change null_type to get ordered_map
#define N  200005
int tme[2];
int b[N],a[N];
bool vis[N];
int ht[N];
int intt[N][2],outt[N][2];
int c[N];
vi v[N];
void inii(){
	rep(i,0,N){
		a[i]=0,b[i]=0;
		vis[i]=false;
		ht[i]=0;
	}
}
void dfs(int node,int dep){
	vis[node]=true;
	ht[node]=dep;
	if(dep%2){
		a[tme[1]]=c[node];
	}
	else{
		b[tme[0]]=c[node];
	}
	rep(i,0,2){
		intt[node][i]=tme[i];
	}
	tme[dep%2]++;
	for(auto i:v[node]){
		if(!vis[i]){
			dfs(i,dep+1);
		}
	}
	rep(i,0,2){
		outt[node][i]=tme[i];
	}
}
vi seg[2],lazy[2];
void build(int node,int start,int end,int flag){
    if(start==end){
    	if(flag)
	        seg[flag][node]=a[start];
    	else
    		seg[flag][node]=b[start];
        return;
    }
    int mid=(start+end)>>1;
    build(node<<1,start,mid,flag);
    build(node<<1|1,mid+1,end,flag);
    seg[flag][node]=seg[flag][node<<1]+seg[flag][node<<1|1];
}
void update(int node,int start,int end,int l,int r,int val,int flag){
    if(lazy[flag][node]!=0){
        seg[flag][node]+=(end-start+1)*lazy[flag][node];
        if(start!=end){
            lazy[flag][node<<1]+=lazy[flag][node];
            lazy[flag][node<<1|1]+=lazy[flag][node];
        }
        lazy[flag][node]=0;
    }
    if(start>end || start>r || end<l) return;
    if(l<=start && end<=r){
        seg[flag][node]+=(end-start+1)*val;
        if(start!=end){
            lazy[flag][node<<1]+=val;
            lazy[flag][node<<1|1]+=val;
        }
        return;
    }
    int mid=(start+end)>>1;
    update(node<<1,start,mid,l,r,val,flag);
    update(node<<1|1,mid+1,end,l,r,val,flag);
    seg[flag][node]=seg[flag][node<<1]+seg[flag][node<<1|1];
}
lld query(int node,int start,int end,int l,int r,int flag){
    if(start>end || start>r || end<l) return 0;
    if(lazy[flag][node]!=0){
        seg[flag][node]+=(end-start+1)*lazy[flag][node];
        if(start!=end){
            lazy[flag][node<<1]+=lazy[flag][node];
            lazy[flag][node<<1|1]+=lazy[flag][node];
        }
        lazy[flag][node]=0;
    }
    if(start>=l && end<=r) return seg[flag][node];
    int mid=(start+end)>>1;
    lld q1=query(node<<1,start,mid,l,r,flag);
    lld q2=query(node<<1|1,mid+1,end,l,r,flag);
    return q1+q2;
}
void solve()
{
	inii();
	int n,m;
	cin >> n >> m;
	rep(i,1,n+1){
		cin >> c[i];
	}
	rep(i,1,n){
		lld x,y;
		cin >> x >> y;
		v[x].pb(y),v[y].pb(x);
	}
	dfs(1,0);
	rep(i,0,2){
		seg[i].resize(4*tme[i]+4);
		lazy[i].resize(4*tme[i]+4);
	}
	rep(i,0,2){
		build(1,0,tme[i]-1,i);
	}
	rep(i,0,m){
		int ty;
		cin >> ty;
		if(ty==1){
			int x,val;
			cin >> x >> val;
			int r=ht[x]%2;
			if(intt[x][r]<=outt[x][r]-1)
				update(1,0,tme[r]-1,intt[x][r],outt[x][r]-1,val,r);
			if(intt[x][1^r]<=outt[x][1^r]-1)
				update(1,0,tme[r^1]-1,intt[x][1^r],outt[x][1^r]-1,-val,1^r);
		}
		else{
			int x;
			cin >> x;
			int r=ht[x]%2;
			lld ans;
			if(r){
				ans=query(1,0,tme[1]-1,intt[x][1],intt[x][1],1);
			}
			else{
				ans=query(1,0,tme[0]-1,intt[x][0],intt[x][0],0);
			}
			cout << ans << endl;
		}
	}
}
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	int tests=1;
	//cin>>tests;
	while(tests--)
	{
		solve();
	}
}