/*  Bismillahir Rahmanir Rahim  */

#include <bits/stdc++.h>
#define ll long long
#define PII pair <ll,ll>
#define int ll
using namespace std;

PII range[200005];
ll tree[200005];
int num[200005],coeff[200005],fns,ara[200005];
vector <int> edges[200005];

void dfs (int s,int k)
{
    if (coeff[s]!=0) return;
    coeff[s]=k;
    range[s].first=fns;

    int i,t,u;
    t=edges[s].size();
    for (i=0;i<t;i++) {
        u=edges[s][i];
        dfs (u,k*-1);
    }

    ara[fns]=num[s];
    range[s].second=fns;
    fns++;
}

void propagate (int pos)
{
    int x=pos*2;

    tree[x]+=tree[pos];
    tree[x+1]+=tree[pos];
    tree[pos]=0;
}

void update (int pos,int L,int R,int l,int r,int val)
{
    if (L>r || l>R) return;
    if (L>=l && R<=r) {
        tree[pos]+=val;
        return;
    }

    if (tree[pos]!=0) propagate(pos);

    int x=pos*2,mid=(L+R)/2;
    update (x,L,mid,l,r,val);
    update (x+1,mid+1,R,l,r,val);
}

ll query (int pos,int L,int R,int k)
{
    if (L>k || k>R) return 0;
    if (L==R) return tree[pos];

    if (tree[pos]!=0) propagate(pos);

    int x=pos*2,mid=(L+R)/2;
    ll y=query(x,L,mid,k);
    ll z=query(x+1,mid+1,R,k);
    return y+z;
}

int_32 main ()
{
    int i,j,u,v;
    ll ans;

    scanf ("%lld %lld",&n,&m);
    for (i=1;i<=n;i++) scanf ("%lld",&num[i]);
    for (i=1;i<n;i++) {
        scanf ("%lld %lld",&u,&v);
        edges[u].push_back(v);
        edges[v].push_back(u);
    }
    fns=1;
    dfs(1,1);
/*cout<<endl;
    for (i=1;i<=n;i++) {
        cout<<range[i].first<<' '<<range[i].second<<' '<<coeff[i]<<endl;
    }cout<<endl;*/
    for (i=0;i<m;i++) {
        scanf ("%lld",&j);
        if (j==1) {
            scanf ("%lld %lld",&u,&v);
            update(1,1,n,range[u].first,range[u].second,v*coeff[u]);
        }
        else {
            scanf ("%lld",&u);
            ans=query(1,1,n,range[u].second);
            ans=(ans*coeff[u])+num[u];
            printf ("%lld\n",ans);
        }
    }

    return 0;
}


/*  Bismillahir Rahmanir Rahim  */

#include <bits/stdc++.h>
#define ll long long
#define PII pair <ll,ll>
#define int ll
using namespace std;

PII range[200005];
ll tree[200005];
int num[200005],coeff[200005],fns,ara[200005];
vector <int> edges[200005];

void dfs (int s,int k)
{
    if (coeff[s]!=0) return;
    coeff[s]=k;
    range[s].first=fns;

    int i,t,u;
    t=edges[s].size();
    for (i=0;i<t;i++) {
        u=edges[s][i];
        dfs (u,k*-1);
    }

    ara[fns]=num[s];
    range[s].second=fns;
    fns++;
}

void propagate (int pos)
{
    int x=pos*2;

    tree[x]+=tree[pos];
    tree[x+1]+=tree[pos];
    tree[pos]=0;
}

void update (int pos,int L,int R,int l,int r,int val)
{
    if (L>r || l>R) return;
    if (L>=l && R<=r) {
        tree[pos]+=val;
        return;
    }

    if (tree[pos]!=0) propagate(pos);

    int x=pos*2,mid=(L+R)/2;
    update (x,L,mid,l,r,val);
    update (x+1,mid+1,R,l,r,val);
}

ll query (int pos,int L,int R,int k)
{
    if (L>k || k>R) return 0;
    if (L==R) return tree[pos];

    if (tree[pos]!=0) propagate(pos);

    int x=pos*2,mid=(L+R)/2;
    ll y=query(x,L,mid,k);
    ll z=query(x+1,mid+1,R,k);
    return y+z;
}

int32_t main ()
{
    int i,j,u,v,n,m;
    ll ans;

    scanf ("%lld %lld",&n,&m);
    for (i=1;i<=n;i++) scanf ("%lld",&num[i]);
    for (i=1;i<n;i++) {
        scanf ("%lld %lld",&u,&v);
        edges[u].push_back(v);
        edges[v].push_back(u);
    }
    fns=1;
    dfs(1,1);
/*cout<<endl;
    for (i=1;i<=n;i++) {
        cout<<range[i].first<<' '<<range[i].second<<' '<<coeff[i]<<endl;
    }cout<<endl;*/
    for (i=0;i<m;i++) {
        scanf ("%lld",&j);
        if (j==1) {
            scanf ("%lld %lld",&u,&v);
            update(1,1,n,range[u].first,range[u].second,v*coeff[u]);
        }
        else {
            scanf ("%lld",&u);
            ans=query(1,1,n,range[u].second);
            ans=(ans*coeff[u])+num[u];
            printf ("%lld\n",ans);
        }
    }

    return 0;
}


/*  Bismillahir Rahmanir Rahim  */

#include <bits/stdc++.h>
#define ll long long
#define PII pair <ll,ll>
using namespace std;

PII tree[525000],range[200005];
int m,n,num[200005],coeff[200005],lazy[200005],fns,ara[200005];
vector <int> edges[200005];

void dfs (int s,int k)
{
    if (coeff[s]!=0) return;
    coeff[s]=k;
    range[s].first=fns;

    int i,t,u;
    t=edges[s].size();
    for (i=0;i<t;i++) {
        u=edges[s][i];
        dfs (u,k*-1);
    }

    ara[fns]=num[s];
    range[s].second=fns;
    fns++;
}

void build (int pos,int L,int R)
{
    if (L==R) {
        tree[pos].first=ara[L];
        tree[pos].second=coeff[L];
        return;
    }

    int x=pos*2,mid=(L+R)/2;
    build(x,L,mid);
    build(x+1,mid+1,R);
    tree[pos].first=tree[x].first+tree[x+1].first;
    tree[pos].second=tree[x].second+tree[x+1].second;
}

void propagate (int pos,int L,int R)
{
    int x=pos*2,mid=(L+R)/2;

    tree[x].first+=tree[x].second*lazy[pos]*(mid-L+1);
    tree[x+1].first+=tree[x+1].second*lazy[pos]*(R-mid);
    lazy[x]+=lazy[pos];
    lazy[x+1]+=lazy[pos];
    lazy[pos]=0;
}

void update (int pos,int L,int R,int l,int r,int val)
{
    if (L>r || l>R) return;
    if (L>=l && R<=r) {
        lazy[pos]+=val;
        tree[pos].first+=val*tree[pos].second*(R-L+1);
        return;
    }

    if (lazy[pos]!=0) propagate(pos,L,R);

    int x=pos*2,mid=(L+R)/2;
    update (x,L,mid,l,r,val);
    update (x+1,mid+1,R,l,r,val);
}

ll query (int pos,int L,int R,int k)
{
    if (L>k || k>R) return 0;
    if (L==R) return tree[pos].first;

    if (lazy[pos]!=0) propagate(pos,L,R);

    int x=pos*2,mid=(L+R)/2;
    ll y=query(x,L,mid,k);
    ll z=query(x+1,mid+1,R,k);
    return y+z;
}

int main ()
{
    int i,j,u,v;
    ll ans;

    scanf ("%d %d",&m,&n);
    for (i=1;i<=n;i++) scanf ("%d",&num[i]);
    for (i=1;i<n;i++) {
        scanf ("%d %d",&u,&v);
        edges[u].push_back(v);
        edges[v].push_back(u);
    }
    fns=1;
    dfs(1,1);
    build(1,1,n);
    for (i=0;i<m;i++) {
        scanf ("%d",&j);
        if (j==1) {
            scanf ("%d %d",&u,&v);
            update(1,1,n,range[u].first,range[u].second,v*coeff[u]);
        }
        else {
            scanf ("%d",&u);
            ans=query(1,1,n,range[u].second);
            printf ("%lld\n",ans);
        }
    }

    return 0;
}


/*  Bismillahir Rahmanir Rahim  */

#include <bits/stdc++.h>
#define ll long long
#define PII pair <ll,ll>
#define int ll
using namespace std;

PII range[200005];
ll tree[200005];
int num[200005],coeff[200005],fns,ara[200005];
vector <int> edges[200005];

void dfs (int s,int k)
{
    if (coeff[s]!=0) return;
    coeff[s]=k;
    range[s].first=fns;

    int i,t,u;
    t=edges[s].size();
    for (i=0;i<t;i++) {
        u=edges[s][i];
        dfs (u,k*-1);
    }

    ara[fns]=num[s];
    range[s].second=fns;
    fns++;
}

void propagate (int pos)
{
    int x=pos*2;

    tree[x]+=tree[pos];
    tree[x+1]+=tree[pos];
    tree[pos]=0;
}

void update (int pos,int L,int R,int l,int r,int val)
{
    if (L>r || l>R) return;
    if (L>=l && R<=r) {
        tree[pos]+=val;
        return;
    }

    if (tree[pos]!=0) propagate(pos);

    int x=pos*2,mid=(L+R)/2;
    update (x,L,mid,l,r,val);
    update (x+1,mid+1,R,l,r,val);
}

ll query (int pos,int L,int R,int k)
{
    if (L>k || k>R) return 0;
    if (L==R) return tree[pos];

    if (tree[pos]!=0) propagate(pos);

    int x=pos*2,mid=(L+R)/2;
    ll y=query(x,L,mid,k);
    ll z=query(x+1,mid+1,R,k);
    return y+z;
}

int32_t main ()
{
    int i,j,u,v;
    ll ans;

    scanf ("%lld %lld",&n,&m);
    for (i=1;i<=n;i++) scanf ("%lld",&num[i]);
    for (i=1;i<n;i++) {
        scanf ("%lld %lld",&u,&v);
        edges[u].push_back(v);
        edges[v].push_back(u);
    }
    fns=1;
    dfs(1,1);
/*cout<<endl;
    for (i=1;i<=n;i++) {
        cout<<range[i].first<<' '<<range[i].second<<' '<<coeff[i]<<endl;
    }cout<<endl;*/
    for (i=0;i<m;i++) {
        scanf ("%lld",&j);
        if (j==1) {
            scanf ("%lld %lld",&u,&v);
            update(1,1,n,range[u].first,range[u].second,v*coeff[u]);
        }
        else {
            scanf ("%lld",&u);
            ans=query(1,1,n,range[u].second);
            ans=(ans*coeff[u])+num[u];
            printf ("%lld\n",ans);
        }
    }

    return 0;
}


#include<bits/stdc++.h>
# define mx 200005
using namespace std;
vector <int> adj[mx];
#define IOS ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
int se[mx],so[mx],eo[mx],ee[mx],table1[mx],table2[mx],l[mx],a[mx];
int te=1,to=1;

void addedge(int u,int v)
{
	adj[u].push_back(v);
	adj[v].push_back(u);
}
void update1(int i,int delta)
{
	while(i<=mx)
	{
		table1[i]+=delta;
		i+=(i&-i);
	}
}
int sum1(int i)
{
	int ans=0;
	while(i>0)
	{
		ans+=table1[i];
		i-=(i&-i);
	}
	return ans;
}
void update2(int i,int delta)
{
	while(i<=mx)
	{
		table2[i]+=delta;
		i+=(i&-i);
	}
}
int sum2(int i)
{
	int ans=0;
	while(i>0)
	{
		ans+=table2[i];
		i-=(i&-i);
	}
	return ans;
}

void dfs(int u,int par,int level)
{
	//cout<<u<<" "<<t<<endl;
	l[u]=level;
	if(level%2==0)
	{se[u]=te++;
	 so[u]=to;}
	else
	{so[u]=to++;
	se[u]=te;}
	for(auto v:adj[u])
	{
		if(v==par)continue;
		dfs(v,u,level+1);
	}
	if(level%2==0)
	{ee[u]=te;
	eo[u]=to;}
	else
	{eo[u]=to;
	ee[u]=te;}
}
int main()
{
	IOS;
	int n,q;
	cin>>n>>q;
	for(int i=1;i<=n;i++)
	{
		ee[i]=se[i]=so[i]=eo[i]=-1;
	}
	for(int i=1;i<=n;i++)
		cin>>a[i];
	for(int i=0;i<n-1;i++)
	{
		int x,y;
		cin>>x>>y;
		addedge(x,y);
	}
	dfs(1,-1,1);
	/*for(int i=1;i<=n;i++)
		cout<<se[i]<<" "<<ee[i]<<"  "<<so[i]<<" "<<eo[i]<<" "<<l[i]<<endl;*/

	for(int i=0;i<q;i++)
	{
		int x,y;
		cin>>x>>y;
		if(x==1) // update subtree rooted at y by z
		{
			int z;
			cin>>z;
			if(l[y]%2==0)
			{
				update1(se[y],z);
				update1(ee[y],-z);
				if(adj[y].size()>1)
				{
				update2(so[y],-z);
				update2(eo[y],z);
				}
			}
			else
			{
				if(adj[y].size()>1 ||  y==1)
				{
					update1(se[y],-z);
					update1(ee[y],+z);
				}

				update2(so[y],z);
				update2(eo[y],-z);

			}
		}
		else // give subtree sum rooted at y
		{
			if(l[y]%2==0)
			cout<<sum1(se[y])+a[y]<<endl;
			else
			cout<<sum2(so[y])+a[y]<<endl;
		}
	}
}


#include<bits/stdc++.h>
# define mx 100005
using namespace std;
vector <int> adj[mx];
#define IOS ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
int se[mx],so[mx],eo[mx],ee[mx],table1[mx],table2[mx],l[mx],a[mx];
int te=1,to=1;
void addedge(int u,int v)
{
	adj[u].push_back(v);
	adj[v].push_back(u);
}
void update1(int i,int delta)
{
	while(i<=mx)
	{
		table1[i]+=delta;
		i+=(i&-i);
	}
}
int sum1(int i)
{
	int ans=0;
	while(i>0)
	{
		ans+=table1[i];
		i-=(i&-i);
	}
	return ans;
}
void update2(int i,int delta)
{
	while(i<=mx)
	{
		table2[i]+=delta;
		i+=(i&-i);
	}
}
int sum2(int i)
{
	int ans=0;
	while(i>0)
	{
		ans+=table2[i];
		i-=(i&-i);
	}
	return ans;
}

void dfs(int u,int par,int level)
{
	//cout<<u<<" "<<t<<endl;
	l[u]=level;
	if(level%2==0)
	{se[u]=te++;
	 so[u]=to;}
	else
	{so[u]=to++;
	se[u]=te;}
	for(auto v:adj[u])
	{
		if(v==par)continue;
		dfs(v,u,level+1);
	}
	if(level%2==0)
	{ee[u]=te++;
	eo[u]=to;}
	else
	{eo[u]=to++;
	ee[u]=te;}
}
int main()
{
	IOS;
	int n,q;
	cin>>n>>q;
	for(int i=1;i<=n;i++)
	{
		ee[i]=se[i]=so[i]=eo[i]=-1;
	}
	for(int i=1;i<=n;i++)
		cin>>a[i];
	for(int i=0;i<n-1;i++)
	{
		int x,y;
		cin>>x>>y;
		addedge(x,y);
	}
	dfs(1,-1,1);
	/*for(int i=1;i<=n;i++)
		cout<<se[i]<<" "<<ee[i]<<"  "<<so[i]<<" "<<eo[i]<<" "<<l[i]<<endl;*/

	for(int i=0;i<q;i++)
	{
		int x,y;
		cin>>x>>y;
		if(x==1) // update subtree rooted at y by z
		{
			int z;
			cin>>z;
			if(l[y]%2==0)
			{
				update1(se[y],z);
				update1(ee[y]+1,-z);
				if(adj[y].size()>1)
				{
				update2(so[y],-z);
				update2(eo[y],z);
				}
			}
			else
			{
				if(adj[y].size()>1 ||  y==1)
				{
					update1(se[y],-z);
					update1(ee[y],+z);
				}

				update2(so[y],z);
				update2(eo[y]+1,-z);

			}
		}
		else // give subtree sum rooted at y
		{
			if(l[y]%2==0)
			cout<<sum1(se[y])+a[y]<<endl;
			else
			cout<<sum2(so[y])+a[y]<<endl;
		}
	}
}


#include<bits/stdc++.h>
# define mx 100005
using namespace std;
vector <int> adj[mx];
#define IOS ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
int se[mx],so[mx],eo[mx],ee[mx],table1[mx],table2[mx],l[mx],a[mx];
int te=1,to=1;
void addedge(int u,int v)
{
	adj[u].push_back(v);
	adj[v].push_back(u);
}
void update1(int i,int delta)
{
	while(i<=mx)
	{
		table1[i]+=delta;
		i+=(i&-i);
	}
}
int sum1(int i)
{
	int ans=0;
	while(i>0)
	{
		ans+=table1[i];
		i-=(i&-i);
	}
	return ans;
}
void update2(int i,int delta)
{
	while(i<=mx)
	{
		table2[i]+=delta;
		i+=(i&-i);
	}
}
int sum2(int i)
{
	int ans=0;
	while(i>0)
	{
		ans+=table2[i];
		i-=(i&-i);
	}
	return ans;
}

void dfs(int u,int par,int level)
{
	//cout<<u<<" "<<t<<endl;
	l[u]=level;
	if(level%2==0)
	{se[u]=te++;
	 so[u]=to;}
	else
	{so[u]=to++;
	se[u]=te;}
	for(auto v:adj[u])
	{
		if(v==par)continue;
		dfs(v,u,level+1);
	}
	if(level%2==0)
	{ee[u]=te++;
	eo[u]=to;}
	else
	{eo[u]=to++;
	ee[u]=te;}
}
int main()
{
	IOS;
	int n,q;
	cin>>n>>q;
	for(int i=1;i<=n;i++)
	{
		ee[i]=se[i]=so[i]=eo[i]=-1;
	}
	for(int i=1;i<=n;i++)
		cin>>a[i];
	for(int i=0;i<n-1;i++)
	{
		int x,y;
		cin>>x>>y;
		addedge(x,y);
	}
	dfs(1,-1,1);
	/*for(int i=1;i<=n;i++)
		cout<<se[i]<<" "<<ee[i]<<"  "<<so[i]<<" "<<eo[i]<<" "<<l[i]<<endl;*/

	for(int i=0;i<q;i++)
	{
		int x,y;
		cin>>x>>y;
		if(x==1) // update subtree rooted at y by z
		{
			int z;
			cin>>z;
			if(l[y]%2==0)
			{
				update1(se[y],z);
				update1(ee[y]+1,-z);
				if(adj[y].size()>1)
				{
				update2(so[y],-z);
				update2(eo[y]+1,z);
				}
			}
			else
			{
				if(adj[y].size()>1)
				{update1(se[y],-z);
				update1(ee[y]+1,+z);}

				update2(so[y],z);
				update2(eo[y]+1,-z);

			}
		}
		else // give subtree sum rooted at y
		{
			if(l[y]%2==0)
			cout<<sum1(se[y])+a[y]<<endl;
			else
			cout<<sum2(so[y])+a[y]<<endl;
		}
	}
}


#include<bits/stdc++.h>
# define mx 100005
using namespace std;
vector <int> adj[mx];
#define IOS ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
int se[mx],so[mx],eo[mx],ee[mx],table1[mx],table2[mx],l[mx],a[mx];
int te=1,to=1;
void addedge(int u,int v)
{
	adj[u].push_back(v);
	adj[v].push_back(u);
}
void update1(int i,int delta)
{
	while(i<=mx)
	{
		table1[i]+=delta;
		i+=(i&-i);
	}
}
int sum1(int i)
{
	int ans=0;
	while(i>0)
	{
		ans+=table1[i];
		i-=(i&-i);
	}
	return ans;
}
void update2(int i,int delta)
{
	while(i<=mx)
	{
		table2[i]+=delta;
		i+=(i&-i);
	}
}
int sum2(int i)
{
	int ans=0;
	while(i>0)
	{
		ans+=table2[i];
		i-=(i&-i);
	}
	return ans;
}

void dfs(int u,int par,int level)
{
	//cout<<u<<" "<<t<<endl;
	l[u]=level;
	if(level%2==0)
	{se[u]=te++;
	 so[u]=to;}
	else
	{so[u]=to++;
	se[u]=te;}
	for(auto v:adj[u])
	{
		if(v==par)continue;
		dfs(v,u,level+1);
	}
	if(level%2==0)
	{ee[u]=te++;
	eo[u]=to;}
	else
	{eo[u]=to++;
	ee[u]=te;}
}
int main()
{
	IOS;
	int n,q;
	cin>>n>>q;
	for(int i=1;i<=n;i++)
	{
		ee[i]=se[i]=so[i]=eo[i]=-1;
	}
	for(int i=1;i<=n;i++)
		cin>>a[i];
	for(int i=0;i<n-1;i++)
	{
		int x,y;
		cin>>x>>y;
		addedge(x,y);
	}
	dfs(1,-1,1);
	/*for(int i=1;i<=n;i++)
		cout<<se[i]<<" "<<ee[i]<<"  "<<so[i]<<" "<<eo[i]<<" "<<l[i]<<endl;*/

	for(int i=0;i<q;i++)
	{
		int x,y;
		cin>>x>>y;
		if(x==1) // update subtree rooted at y by z
		{
			int z;
			cin>>z;
			if(l[y]%2==0)
			{
				update1(se[y],z);
				update1(ee[y]+1,-z);
				if(adj[y].size()>1)
				{
				update2(so[y],-z);
				update2(eo[y]+1,z);
				}
			}
			else
			{
				if(adj[y].size()>1 ||  y==1)
				{update1(se[y],-z);
				update1(ee[y]+1,+z);}

				update2(so[y],z);
				update2(eo[y]+1,-z);

			}
		}
		else // give subtree sum rooted at y
		{
			if(l[y]%2==0)
			cout<<sum1(se[y])+a[y]<<endl;
			else
			cout<<sum2(so[y])+a[y]<<endl;
		}
	}
}


#include<bits/stdc++.h>
# define mx 200005
using namespace std;
vector <int> adj[mx];
#define IOS ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
int se[mx],so[mx],eo[mx],ee[mx],table1[mx],table2[mx],l[mx],a[mx];
int te=1,to=1;
void addedge(int u,int v)
{
	adj[u].push_back(v);
	adj[v].push_back(u);
}
void update1(int i,int delta)
{
	while(i<=mx)
	{
		table1[i]+=delta;
		i+=(i&-i);
	}
}
int sum1(int i)
{
	int ans=0;
	while(i>0)
	{
		ans+=table1[i];
		i-=(i&-i);
	}
	return ans;
}
void update2(int i,int delta)
{
	while(i<=mx)
	{
		table2[i]+=delta;
		i+=(i&-i);
	}
}
int sum2(int i)
{
	int ans=0;
	while(i>0)
	{
		ans+=table2[i];
		i-=(i&-i);
	}
	return ans;
}

void dfs(int u,int par,int level)
{
	//cout<<u<<" "<<t<<endl;
	l[u]=level;
	if(level%2==0)
	{se[u]=te++;
	 so[u]=to;}
	else
	{so[u]=to++;
	se[u]=te;}
	for(auto v:adj[u])
	{
		if(v==par)continue;
		dfs(v,u,level+1);
	}
	if(level%2==0)
	{ee[u]=te;
	eo[u]=to;}
	else
	{eo[u]=to;
	ee[u]=te;}
}
int main()
{
	IOS;
	int n,q;
	cin>>n>>q;
	for(int i=1;i<=n;i++)
	{
		ee[i]=se[i]=so[i]=eo[i]=-1;
	}
	for(int i=1;i<=n;i++)
		cin>>a[i];
	for(int i=0;i<n-1;i++)
	{
		int x,y;
		cin>>x>>y;
		addedge(x,y);
	}
	dfs(1,-1,1);
	/*for(int i=1;i<=n;i++)
		cout<<se[i]<<" "<<ee[i]<<"  "<<so[i]<<" "<<eo[i]<<" "<<l[i]<<endl;*/

	for(int i=0;i<q;i++)
	{
		int x,y;
		cin>>x>>y;
		if(x==1) // update subtree rooted at y by z
		{
			int z;
			cin>>z;
			if(l[y]%2==0)
			{
				update1(se[y],z);
				update1(ee[y],-z);
				if(adj[y].size()>1)
				{
				update2(so[y],-z);
				update2(eo[y],z);
				}
			}
			else
			{
				if(adj[y].size()>1 ||  y==1)
				{
					update1(se[y],-z);
					update1(ee[y],+z);
				}

				update2(so[y],z);
				update2(eo[y],-z);

			}
		}
		else // give subtree sum rooted at y
		{
			if(l[y]%2==0)
			cout<<sum1(se[y])+a[y]<<endl;
			else
			cout<<sum2(so[y])+a[y]<<endl;
		}
	}
}


#include<bits/stdc++.h>
# define mx 200005
using namespace std;
vector <int> adj[mx];
#define IOS ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
int se[mx],so[mx],eo[mx],ee[mx],table1[mx],table2[mx],l[mx],a[mx];
int te=1,to=1;
void addedge(int u,int v)
{
	adj[u].push_back(v);
	adj[v].push_back(u);
}
void update1(int i,int delta)
{
	while(i<=mx)
	{
		table1[i]+=delta;
		i+=(i&-i);
	}
}
int sum1(int i)
{
	int ans=0;
	while(i>0)
	{
		ans+=table1[i];
		i-=(i&-i);
	}
	return ans;
}
void update2(int i,int delta)
{
	while(i<=mx)
	{
		table2[i]+=delta;
		i+=(i&-i);
	}
}
int sum2(int i)
{
	int ans=0;
	while(i>0)
	{
		ans+=table2[i];
		i-=(i&-i);
	}
	return ans;
}

void dfs(int u,int par,int level)
{
	//cout<<u<<" "<<t<<endl;
	l[u]=level;
	if(level%2==0)
	{se[u]=te++;
	 so[u]=to;}
	else
	{so[u]=to++;
	se[u]=te;}
	for(auto v:adj[u])
	{
		if(v==par)continue;
		dfs(v,u,level+1);
	}
	if(level%2==0)
	{ee[u]=te++;
	eo[u]=to;}
	else
	{eo[u]=to++;
	ee[u]=te;}
}
int main()
{
	IOS;
	int n,q;
	cin>>n>>q;
	for(int i=1;i<=n;i++)
	{
		ee[i]=se[i]=so[i]=eo[i]=-1;
	}
	for(int i=1;i<=n;i++)
		cin>>a[i];
	for(int i=0;i<n-1;i++)
	{
		int x,y;
		cin>>x>>y;
		addedge(x,y);
	}
	dfs(1,-1,1);
	/*for(int i=1;i<=n;i++)
		cout<<se[i]<<" "<<ee[i]<<"  "<<so[i]<<" "<<eo[i]<<" "<<l[i]<<endl;*/

	for(int i=0;i<q;i++)
	{
		int x,y;
		cin>>x>>y;
		if(x==1) // update subtree rooted at y by z
		{
			int z;
			cin>>z;
			if(l[y]%2==0)
			{
				update1(se[y],z);
				update1(ee[y],-z);
				if(adj[y].size()>1)
				{
				update2(so[y],-z);
				update2(eo[y],z);
				}
			}
			else
			{
				if(adj[y].size()>1 ||  y==1)
				{
					update1(se[y],-z);
					update1(ee[y],+z);
				}

				update2(so[y],z);
				update2(eo[y],-z);

			}
		}
		else // give subtree sum rooted at y
		{
			if(l[y]%2==0)
			cout<<sum1(se[y])+a[y]<<endl;
			else
			cout<<sum2(so[y])+a[y]<<endl;
		}
	}
}


#include<bits/stdc++.h>
# define mx 200005
using namespace std;
vector <int> adj[mx];
#define IOS ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
int se[mx],so[mx],eo[mx],ee[mx],table1[mx],table2[mx],l[mx],a[mx];
int te=1,to=1;
void addedge(int u,int v)
{
	adj[u].push_back(v);
	adj[v].push_back(u);
}
void update1(int i,int delta)
{
	while(i<=mx)
	{
		table1[i]+=delta;
		i+=(i&-i);
	}
}
int sum1(int i)
{
	int ans=0;
	while(i>0)
	{
		ans+=table1[i];
		i-=(i&-i);
	}
	return ans;
}
void update2(int i,int delta)
{
	while(i<=mx)
	{
		table2[i]+=delta;
		i+=(i&-i);
	}
}
int sum2(int i)
{
	int ans=0;
	while(i>0)
	{
		ans+=table2[i];
		i-=(i&-i);
	}
	return ans;
}

void dfs(int u,int par,int level)
{
	//cout<<u<<" "<<t<<endl;
	l[u]=level;
	if(level%2==0)
	{se[u]=te++;
	 so[u]=to;}
	else
	{so[u]=to++;
	se[u]=te;}
	for(auto v:adj[u])
	{
		if(v==par)continue;
		dfs(v,u,level+1);
	}
	if(level%2==0)
	{ee[u]=te++;
	eo[u]=to;}
	else
	{eo[u]=to++;
	ee[u]=te;}
}
int main()
{
	IOS;
	int n,q;
	cin>>n>>q;
	for(int i=1;i<=n;i++)
	{
		ee[i]=se[i]=so[i]=eo[i]=-1;
	}
	for(int i=1;i<=n;i++)
		cin>>a[i];
	for(int i=0;i<n-1;i++)
	{
		int x,y;
		cin>>x>>y;
		addedge(x,y);
	}
	dfs(1,-1,1);
	/*for(int i=1;i<=n;i++)
		cout<<se[i]<<" "<<ee[i]<<"  "<<so[i]<<" "<<eo[i]<<" "<<l[i]<<endl;*/

	for(int i=0;i<q;i++)
	{
		int x,y;
		cin>>x>>y;
		if(x==1) // update subtree rooted at y by z
		{
			int z;
			cin>>z;
			if(l[y]%2==0)
			{
				update1(se[y],z);
				update1(ee[y]+1,-z);
				if(adj[y].size()>1)
				{
				update2(so[y],-z);
				update2(eo[y],z);
				}
			}
			else
			{
				if(adj[y].size()>1 ||  y==1)
				{
					update1(se[y],-z);
					update1(ee[y],+z);
				}

				update2(so[y],z);
				update2(eo[y]+1,-z);

			}
		}
		else // give subtree sum rooted at y
		{
			if(l[y]%2==0)
			cout<<sum1(se[y])+a[y]<<endl;
			else
			cout<<sum2(so[y])+a[y]<<endl;
		}
	}
}


#include<bits/stdc++.h>
# define mx 100005
using namespace std;
vector <int> adj[mx];
#define IOS ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
int se[mx],so[mx],eo[mx],ee[mx],table1[mx],table2[mx],l[mx],a[mx];
int te=1,to=1;
void addedge(int u,int v)
{
	adj[u].push_back(v);
	adj[v].push_back(u);
}
void update1(int i,int delta)
{
	while(i<=mx)
	{
		table1[i]+=delta;
		i+=(i&-i);
	}
}
int sum1(int i)
{
	int ans=0;
	while(i>0)
	{
		ans+=table1[i];
		i-=(i&-i);
	}
	return ans;
}
void update2(int i,int delta)
{
	while(i<=mx)
	{
		table2[i]+=delta;
		i+=(i&-i);
	}
}
int sum2(int i)
{
	int ans=0;
	while(i>0)
	{
		ans+=table2[i];
		i-=(i&-i);
	}
	return ans;
}

void dfs(int u,int par,int level)
{
	//cout<<u<<" "<<t<<endl;
	l[u]=level;
	if(level%2==0)
	{se[u]=te++;
	 so[u]=to;}
	else
	{so[u]=to++;
	se[u]=te;}
	for(auto v:adj[u])
	{
		if(v==par)continue;
		dfs(v,u,level+1);
	}
	if(level%2==0)
	{ee[u]=te++;
	eo[u]=to;}
	else
	{eo[u]=to++;
	ee[u]=te;}
}
int main()
{
	IOS;
	int n,q;
	cin>>n>>q;
	for(int i=1;i<=n;i++)
	{
		ee[i]=se[i]=so[i]=eo[i]=-1;
	}
	for(int i=1;i<=n;i++)
		cin>>a[i];
	for(int i=0;i<n-1;i++)
	{
		int x,y;
		cin>>x>>y;
		addedge(x,y);
	}
	dfs(1,-1,1);
	/*for(int i=1;i<=n;i++)
		cout<<se[i]<<" "<<ee[i]<<"  "<<so[i]<<" "<<eo[i]<<" "<<l[i]<<endl;*/

	for(int i=0;i<q;i++)
	{
		int x,y;
		cin>>x>>y;
		if(x==1) // update subtree rooted at y by z
		{
			int z;
			cin>>z;
			if(l[y]%2==0)
			{
				update1(se[y],z);
				update1(ee[y]+1,-z);
				update2(so[y],-z);
				update2(eo[y]+1,z);
			}
			else
			{
				update1(se[y],-z);
				update1(ee[y]+1,+z);
				update2(so[y],z);
				update2(eo[y]+1,-z);
			}
		}
		else // give subtree sum rooted at y
		{
			if(l[y]%2==0)
			cout<<sum1(se[y])+a[y]<<endl;
			else
			cout<<sum2(so[y])+a[y]<<endl;
		}
	}
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define vec vector
#define pb push_back
#define s(x) scanf("%d",&x)
#define all(x)	x.begin(),x.end()
#define pii pair<int,int>
#define fi first
#define se second
#define SZ 100005
#define boost ios::sync_with_stdio(0);

int bit[400005],n,m,t,st[200005],en[200005],sgn[200005];
vec<int> adj[200005];

void update(int x,int val){
	for(int i=x; i<=2*n; i+=i&(-i))
	bit[i]+=val;
}
int query(int x){
	int sum=0;
	for(int i=x; i>0; i-=i&(-i))
	sum+=bit[i];
	return sum;
}

void dfs(int u,int p,int s)
{
	st[u]=++t;
	sgn[u]=s;
	for (int i: adj[u])
	{
		if(i-p)
		dfs(i,u,-s);
	}
	en[u]=++t;
}
int main()
{
	boost;
	int x,val,u,v,typ;
	cin>>n>>m;
	int a[n+1];
	for(int i=1; i<=n; i++) cin>>a[i];
	for(int i=0; i<n-1; i++){
		cin>>u>>v;
		adj[u].pb(v);
		adj[v].pb(u);
	}
	dfs(1,-1,1);

	while (m--)
	{
		cin>>typ;
		if (typ==1)
		{
			cin>>x>>val;
			update(st[x],val*sgn[x]);
			update(en[x]+1,-val*sgn[x]);
		}
		else
		{
			cin>>x;
			cout<<a[x]+query(st[x])*sgn[x]<<endl;
		}
	}
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define vec vector
#define pb push_back
#define s(x) scanf("%d",&x)
#define all(x)	x.begin(),x.end()
#define pii pair<int,int>
#define fi first
#define se second
#define SZ 100005
#define boost ios::sync_with_stdio(0);

int bit[400005],n,m,t,st[200005],en[200005],sgn[200005];
vec<int> adj[200005];

void update(int x,int val){
	for(int i=x; i<=2*n; i+=i&(-i))
	bit[i]+=val;
}
int query(int x){
	int sum=0;
	for(int i=x; i>0; i-=i&(-i))
	sum+=bit[i];
	return sum;
}

void dfs(int u,int p,int s)
{
	st[u]=++t;
	sgn[u]=s;
	for (int i: adj[u])
	{
		if(i-p)
		dfs(i,u,-s);
	}
	en[u]=++t;
}
int main()
{
	boost;
	int x,val,u,v,typ;
	cin>>n>>m;
	int a[n+1];
	for(int i=1; i<=n; i++) cin>>a[i];
	for(int i=0; i<n-1; i++){
		cin>>u>>v;
		adj[u].pb(v);
		adj[v].pb(u);
	}
	dfs(1,-1,1);

	while (m--)
	{
		cin>>typ;
		if (typ==1)
		{
			cin>>x>>val;
			update(st[x],val*sgn[x]);
			update(en[x]+1,-val*sgn[x]);
		}
		else
		{
			cin>>x;
			cout<<a[x]+query(x)*sgn[x]<<endl;
		}
	}
}


#include <bits/stdc++.h>
using namespace std;

typedef long long int LL;
typedef unsigned long long uLL;
typedef pair< int,int > ii;
typedef pair< int,ii > iii;
const int inf = 1e9;
const LL INF = 1e18;
const int N = 100005;
const int MOD = 1e9+7;
const double EPS = 1e-6;
const double PI = acos(-1.0);

LL n , m;
LL ara[ 2*N ];
LL Start[ 2*N ] , Finish[ 2*N ] , Level[ 2*N ];
LL Time = 0;
LL Tree[ 2*4*N ] , Lazy[ 2*4*N ];

vector <int> graph[ 2*N ];

void Propagate( LL node , LL b , LL e ) {
    if( Lazy[node] != 0 ) {
        Tree[node] += ( Lazy[node] );
        if( b != e ) {
            Lazy[2*node] += Lazy[node];
            Lazy[2*node+1] += Lazy[node];
        }
        Lazy[node] = 0;
    }
}
void Update( LL node , LL b , LL e , LL i , LL j , LL val ) {
    Propagate( node , b , e );
    if( i > e || j < b ) return;
    if( i <= b && j >= e ) {
        Tree[node] += val;
        if( b != e ) {
            Lazy[2*node] += val;
            Lazy[2*node+1] += val;
        }
        return;
    }
    LL left = 2*node , right = 2*node+1 , mid = (b+e)/2;
    Update( left , b , mid , i , j , val );
    Update( right , mid+1 , e , i , j , val );
    Tree[node] = Tree[left] + Tree[right];
}
LL Query( LL node , LL b , LL e , LL pos ) {
    Propagate( node , b , e );
    if( pos > e || pos < b ) return 0LL;
    if( b == e && b == pos ) return Tree[node];
    LL left = 2*node , right = 2*node+1 , mid = (b+e)/2;
    LL q1 = Query( left , b , mid , pos );
    LL q2 = Query( right , mid+1 , e , pos );
    return ( q1+q2 );
}
void dfs( int s , int p ) {
    Start[s] = ++Time;
    Level[s] = Level[p]+1;
    for( int i = 0; i < graph[ s ].size(); i++ ){
        int next = graph[ s ][ i ];
        if( next == p ) continue;
        dfs( next , s );
    }
    Finish[ s ] = Time;
}
int main( int argc, char const *argv[] ) {
    scanf("%lld %lld",&n,&m);
    for( int i = 1; i <= n; i++ ) {
        scanf("%lld", &ara[i]);
    }
    for( int i = 1; i <= n-1; i++ ) {
        int u , v;
        scanf("%d %d",&u,&v);
        graph[ u ].push_back( v );
        graph[ v ].push_back( u );
    }
    Time = 0;
    dfs( 1 , 0 );
    while( m-- ) {
        int op;
        scanf("%d",&op);
        if( op == 1 ) {
            int pos , val;
            scanf("%d %d",&pos,&val);
            int from = Start[pos] , to = Finish[pos];
            if( Level[pos]&1 ) Update( 1 , 1 , n , from , to , +val );
            else Update( 1 , 1 , 2*N , from , to , -val );
        }
        else {
            int pos;
            scanf("%d",&pos);
            int x = Start[pos];
            LL ans = Query( 1 , 1 , 2*N , x );
            if( Level[pos]&1 ) printf("%lld\n",ara[pos]+ans);
            else printf("%lld\n",ara[pos]-ans);
        }
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef long long int LL;
typedef unsigned long long uLL;
typedef pair< int,int > ii;
typedef pair< int,ii > iii;
const int inf = 1e9;
const LL INF = 1e18;
const int N = 100005;
const int MOD = 1e9+7;
const double EPS = 1e-6;
const double PI = acos(-1.0);

LL n , m;
LL ara[ 2*N ];
LL Start[ 2*N ] , Finish[ 2*N ] , Level[ 2*N ];
LL Time = 0;
LL BIT[ 2*N ];

vector <int> graph[ 2*N ];

void dfs( int s , int p ) {
    Start[s] = ++Time;
    Level[s] = Level[p]+1;
    for( int i = 0; i < graph[ s ].size(); i++ ){
        int next = graph[ s ][ i ];
        if( next == p ) continue;
        dfs( next , s );
    }
    Finish[ s ] = Time;
}
void Update( LL idx , LL val ) {
    for( ; idx <= 2*N; idx += ( idx & -idx ) ) {
        BIT[idx] += val;
    }
}
LL Query( LL idx ) {
    LL ret = 0;
    for( ; idx > 0 ; idx -= ( idx & -idx ) ) {
        ret += BIT[idx];
    }
    return ret;
}
int main( int argc, char const *argv[] ) {
    scanf("%lld %lld",&n,&m);
    for( int i = 1; i <= n; i++ ) {
        scanf("%lld", &ara[i]);
    }
    for( int i = 1; i <= n-1; i++ ) {
        int u , v;
        scanf("%d %d",&u,&v);
        graph[ u ].push_back( v );
        graph[ v ].push_back( u );
    }
    Time = 0;
    dfs( 1 , 0 );
    while( m-- ) {
        int op;
        scanf("%d",&op);
        if( op == 1 ) {
            int pos , val;
            scanf("%d %d",&pos,&val);
            int from = Start[pos] , to = Finish[pos];
            if( Level[pos]&1 ) {
                Update( from , +val );
                Update( to+1 , -val );
            }
            else {
                Update( from , -val );
                Update( to+1 , +val );
            }
        }
        else {
            int pos;
            scanf("%d",&pos);
            int x = Start[pos];
            LL ans = Query( x );
            if( Level[pos]&1 ) printf("%lld\n",ara[pos]+ans);
            else printf("%lld\n",ara[pos]-ans);
        }
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef long long int LL;
typedef unsigned long long uLL;
typedef pair< int,int > ii;
typedef pair< int,ii > iii;
const int inf = 1e9;
const LL INF = 1e18;
const int N = 100005;
const int MOD = 1e9+7;
const double EPS = 1e-6;
const double PI = acos(-1.0);

LL n , m;
LL ara[ 2*N ];
LL Start[ 2*N ] , Finish[ 2*N ] , Level[ 2*N ];
LL Time = 0;
LL Tree[ 2*4*N ] , Lazy[ 2*4*N ];

vector <int> graph[ 2*N ];

void Propagate( LL node , LL b , LL e ) {
    if( Lazy[node] != 0 ) {
        Tree[node] += ( Lazy[node] );
        if( b != e ) {
            Lazy[2*node] += Lazy[node];
            Lazy[2*node+1] += Lazy[node];
        }
        Lazy[node] = 0;
    }
}
void Update( LL node , LL b , LL e , LL i , LL j , LL val ) {
    Propagate( node , b , e );
    if( i > e || j < b ) return;
    if( i <= b && j >= e ) {
        Tree[node] += val;
        if( b != e ) {
            Lazy[2*node] += val;
            Lazy[2*node+1] += val;
        }
        return;
    }
    LL left = 2*node , right = 2*node+1 , mid = (b+e)/2;
    Update( left , b , mid , i , j , val );
    Update( right , mid+1 , e , i , j , val );
    Tree[node] = Tree[left] + Tree[right];
}
LL Query( LL node , LL b , LL e , LL pos ) {
    Propagate( node , b , e );
    if( pos > e || pos < b ) return 0LL;
    if( b == e && b == pos ) return Tree[node];
    LL left = 2*node , right = 2*node+1 , mid = (b+e)/2;
    LL q1 = Query( left , b , mid , pos );
    LL q2 = Query( right , mid+1 , e , pos );
    return ( q1+q2 );
}
void dfs( int s , int p ) {
    Start[s] = ++Time;
    Level[s] = Level[p]+1;
    for( int i = 0; i < graph[ s ].size(); i++ ){
        int next = graph[ s ][ i ];
        if( next == p ) continue;
        dfs( next , s );
    }
    Finish[ s ] = Time;
}
int main( int argc, char const *argv[] ) {
    scanf("%lld %lld",&n,&m);
    for( int i = 1; i <= n; i++ ) {
        scanf("%lld", &ara[i]);
    }
    for( int i = 1; i <= n-1; i++ ) {
        int u , v;
        scanf("%d %d",&u,&v);
        graph[ u ].push_back( v );
        graph[ v ].push_back( u );
    }
    Time = 0;
    dfs( 1 , 0 );
    while( m-- ) {
        int op;
        scanf("%d",&op);
        if( op == 1 ) {
            int pos , val;
            scanf("%d %d",&pos,&val);
            int from = Start[pos] , to = Finish[pos];
            if( Level[pos]&1 ) Update( 1 , 1 , 2*N , from , to , +val );
            else Update( 1 , 1 , 2*N , from , to , -val );
        }
        else {
            int pos;
            scanf("%d",&pos);
            int x = Start[pos];
            LL ans = Query( 1 , 1 , 2*N , x );
            if( Level[pos]&1 ) printf("%lld\n",ara[pos]+ans);
            else printf("%lld\n",ara[pos]-ans);
        }
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;

int n,m,a[200002],tt = 0;
int f[400002],in[200002],out[200002];
int sign[200002],vs[200002];
vector<int> v[200002];

void update(int i,int v){
    for(;i<=400000;i+=i&-i){
        f[i]+=v;
    }
}

int query(int i){
    int s = 0;
    for(;i>=1;i-=i&-i){
        s+=f[i];
    }
    return s;
}

void dfs(int i, int s){
    vs[i] = 1;
    sign[i] = s;
    in[i] = ++tt;
    for(int u : v[i]){
        if(!vs[u]){
            dfs(u,-s);
        }
    }
    out[i] = ++tt;
}

int main(){
    scanf("%d%d",&n,&m);
    for(int i=1;i<=n;i++){
        scanf("%d",&a[i]);
    }
    for(int i=1;i<n;i++){
        int x,y;
        scanf("%d%d",&x,&y);
        v[x].push_back(y);
        v[y].push_back(x);
    }
    dfs(1,1);
    for(int i=1;i<=m;i++){
        int mode,x,y;
        scanf("%d",&mode);
        if(mode == 1){
            scanf("%d%d",&x,&y);
            update(in[x],y*sign[x]);
            update(out[x],-y*sign[x]);
        }
        else{
            scanf("%d",&x);
            printf("%d\n",a[x]+query(in[x])*sign[x]);
        }
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;

int n,m,a[200002],tt = 0;
int f[400002],in[200002],out[200002];
int sign[200002],vs[200002];
vector<int> v[200002];

void update(int i,int v){
    for(;i<=200000;i+=i&-i){
        f[i]+=v;
    }
}

int query(int i){
    int s = 0;
    for(;i>=1;i-=i&-i){
        s+=f[i];
    }
    return s;
}

void dfs(int i, int s){
    vs[i] = 1;
    sign[i] = s;
    in[i] = ++tt;
    for(int u : v[i]){
        if(!vs[u]){
            dfs(u,-s);
        }
    }
    out[i] = ++tt;
}

int main(){
    scanf("%d%d",&n,&m);
    for(int i=1;i<=n;i++){
        scanf("%d",&a[i]);
    }
    for(int i=1;i<n;i++){
        int x,y;
        scanf("%d%d",&x,&y);
        v[x].push_back(y);
        v[y].push_back(x);
    }
    dfs(1,1);
    for(int i=1;i<=m;i++){
        int mode,x,y;
        scanf("%d",&mode);
        if(mode == 1){
            scanf("%d%d",&x,&y);
            update(in[x],y*sign[x]);
            update(out[x],-y*sign[x]);
        }
        else{
            scanf("%d",&x);
            printf("%d\n",a[x]+query(in[x])*sign[x]);
        }
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define RFOR(i, a, b) for (int i = (a); i >= (b); --i)
#define pb push_back
#define mp make_pair
#define least(x) (x&(-x))
typedef long long ll;
typedef long double ld;
const int L=1e5;
std::map<int, int> counter;
set<int> SET;
pair<int,string> PAIR;
#define sz(a)	ll(a.size())
#define ln "\n"
int n,m,type,a,b;
int modu=1000000007;
int arr[400010],start[200010],sign[200002],ending[200010],aux[400060],t=1,val[200010];
std::vector<bool> visit(200002);
std::vector<int> v[200002];
void dfs(int vertex,int s)
{
	if(visit[vertex])return;
	start[vertex]=t;t++;
	sign[vertex]=s;
	visit[vertex]=1;
	FOR(i,0,sz(v[vertex]))
		dfs(v[vertex][i],-s);
	ending[vertex]=t;t++;
	return;
}
void update(int x,int value)
{
	while(x<=2*n)
	{
		// cout<<"upd"<<x<<" "<<least(x)<<endingl;

		aux[x]+=value;
		x=x+least(x);
	}
	return;
}
int query(int x)
{
	int ret=0;
	while(x>0)
	{
		// cout<<"query"<<x<<endingl;
		ret+=aux[x];
		x-=least(x);
	}
	return ret;
}
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	int x,va;
	cin>>n>>m;
	FOR(i,1,n+1)cin>>val[i];
	FOR(i,0,n-1)
	{
		cin>>a>>b;
		v[a].pb(b);
		v[b].pb(a);
	}
	dfs(1,1);
	while(m--)
	{
		cin>>type;
		switch(type)
		{
			case 1:
				cin>>x>>va;
				update(start[x],va*sign[x]);
				update(ending[x]+1,-va*sign[x]);
				break;
			case 2:
				cin>>x;
				cout<<val[x]+sign[x]*query(start[x])<<ln;
		}
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define RFOR(i, a, b) for (int i = (a); i >= (b); --i)
#define pb push_back
#define mp make_pair
#define least(x) (x&(-x))
typedef long long ll;
typedef long double ld;
const int L=1e5;
std::map<int, int> counter;
set<int> SET;
pair<int,string> PAIR;
#define sz(a)	ll(a.size())
#define ln "\n"
int n,m,type,a,b;
int modu=1000000007;
int arr[400010],start[200010],sign[200002],ending[200010],aux[400060],t=1,val[200010];
std::vector<bool> visit(100002);
std::vector<int> v[100002];
void dfs(int vertex,int s)
{
	if(visit[vertex])return;
	start[vertex]=t;t++;
	sign[vertex]=s;
	visit[vertex]=1;
	FOR(i,0,sz(v[vertex]))
		dfs(v[vertex][i],-s);
	ending[vertex]=t;t++;
	return;
}
void update(int x,int value)
{
	while(x<=2*n)
	{
		// cout<<"upd"<<x<<" "<<least(x)<<endingl;

		aux[x]+=value;
		x=x+least(x);
	}
	return;
}
int query(int x)
{
	int ret=0;
	while(x>0)
	{
		// cout<<"query"<<x<<endingl;
		ret+=aux[x];
		x-=least(x);
	}
	return ret;
}
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	int x,va;
	cin>>n>>m;
	FOR(i,1,n+1)cin>>val[i];
	FOR(i,0,n-1)
	{
		cin>>a>>b;
		v[a].pb(b);
		v[b].pb(a);
	}
	dfs(1,1);
	while(m--)
	{
		cin>>type;
		switch(type)
		{
			case 1:
				cin>>x>>va;
				update(start[x],va*sign[x]);
				update(ending[x]+1,-va*sign[x]);
				break;
			case 2:
				cin>>x;
				cout<<val[x]+sign[x]*query(start[x])<<ln;
		}
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define RFOR(i, a, b) for (int i = (a); i >= (b); --i)
#define pb push_back
#define mp make_pair
#define least(x) (x&(-x))
typedef long long ll;
typedef long double ld;
const int L=1e5;
std::map<int, int> counter;
set<int> SET;
pair<int,string> PAIR;
#define sz(a)	ll(a.size())
#define ln "\n"
int n,m,type,a,b;
int modu=1000000007;
int arr[200010],start[200010],sign[100002],ending[200010],aux[400060],t=1,val[100010];
std::vector<bool> visit(100002);
std::vector<int> v[100002];
void dfs(int vertex,int s)
{
	if(visit[vertex])return;
	start[vertex]=t;t++;
	sign[vertex]=s;
	visit[vertex]=1;
	FOR(i,0,sz(v[vertex]))
		dfs(v[vertex][i],-s);
	ending[vertex]=t;t++;
	return;
}
void update(int x,int value)
{
	while(x<=2*n)
	{
		// cout<<"upd"<<x<<" "<<least(x)<<endingl;

		aux[x]+=value;
		x=x+least(x);
	}
	return;
}
int query(int x)
{
	int ret=0;
	while(x>0)
	{
		// cout<<"query"<<x<<endingl;
		ret+=aux[x];
		x-=least(x);
	}
	return ret;
}
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	int x,va;
	cin>>n>>m;
	FOR(i,1,n+1)cin>>val[i];
	FOR(i,0,n-1)
	{
		cin>>a>>b;
		v[a].pb(b);
		v[b].pb(a);
	}
	dfs(1,1);
	while(m--)
	{
		cin>>type;
		switch(type)
		{
			case 1:
				cin>>x>>va;
				update(start[x],va*sign[x]);
				update(ending[x]+1,-va*sign[x]);
				break;
			case 2:
				cin>>x;
				cout<<val[x]+sign[x]*query(start[x])<<ln;
		}
	}
	return 0;
}


//bismillahir rahmanir rahim            //Author:Fayed Anik

#include <bits/stdc++.h>
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>

using namespace std;
//using namespace __gnu_pbds;

//#define         ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
#define         ll                          long  long
#define         lf                          double
#define         pb(x)                       push_back(x)
#define         ull                         unsigned long long
#define         sfl(a)                      scanf("%lld",&a)
#define         sf(a)                       scanf("%d",&a)
#define         pf(a)                       printf("%d\n",a)
#define         pfl(a)                      printf("%lld\n",a)
#define         FOR(x,n)                    for(ll x=1;x<=n;++x)
#define         pii                         pair< ll , ll >
#define         mp(a,b)                     make_pair(a,b)
#define         mod                         1000000007
#define         INF                         2e18
#define         EPS                         1e-15
#define         f1                          first
#define         f2                          second
#define         all(v)                      v.begin(),v.end()
#define         PI                          acos(-1)
#define         printminusone               printf("-1\n")
#define         bug                         printf("bug")
#define         FILEIN                      freopen("in.txt","r",stdin)
#define         FILEOUT                     freopen("out.txt","w",stdout)

//ll SET(ll mask,ll pos){ return mask = (mask | (1ll<<pos)); }
//ll RESET(ll mask,ll pos){ return mask = mask & ~(1ll<<pos); }
//bool CHECK(ll mask,ll pos) { return (bool) (mask & (1ll<<pos)); }
//priority_queue <ll, vector<ll>, greater<ll> > pq;

#define lim 200005

ll a[lim],tree[4*lim][2],lazy[4*lim][2],timein[lim],t=1,timeout[lim],lv[lim];
vector<ll>edge[lim];

void dfs(ll u,ll par,ll d){
    timein[u]=t++;
    lv[u] = d;
    for(auto v :edge[u]){
        if(v!=par){
            dfs(v,u,!d);
        }
    }
    timeout[u]=t;
}
void pushup(ll nd,ll b,ll e,ll ck){
    if( b!=e ){
        lazy[2*nd][ck] += lazy[nd][ck];
        lazy[2*nd+1][ck] += lazy[nd][ck];
    }
    else{
        tree[nd][ck] += lazy[nd][ck];
    }
    lazy[nd][ck]=0;
}

void update(ll nd,ll b,ll e,ll i,ll j,ll val,ll ck){
    if(lazy[nd][ck]){
        //bug
        pushup(nd,b,e,ck);
    }
    if( i>e or j<b ) return;
    if( b>=i and e<=j ){
        lazy[nd][ck] = val;
        return;
    }
    ll mid = (b+e)/2;
    update(2*nd,b,mid,i,j,val,ck);
    update(2*nd+1,mid+1,e,i,j,val,ck);
}

ll get(ll nd,ll b,ll e,ll pos,ll ck){

    if(lazy[nd][ck]){
        pushup(nd,b,e,ck);
    }
    if(b>pos or e<pos){
        return 0;
    }
    if(b==pos and e==pos) return tree[nd][ck];
    ll mid = (b+e)/2;
    return get(2*nd,b,mid,pos,ck)+get(2*nd+1,mid+1,e,pos,ck);
}

int main(){
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
    ll n,m,u,v,t,x,val,ans;
    sfl(n),sfl(m);
    FOR(i,n){
        sfl(a[i]);
    }
    FOR(i,n-1){
        sfl(u),sfl(v);
        edge[u].pb(v);
        edge[v].pb(u);
    }
    dfs(1,-1,0);
    while(m--){
        sfl(t);
        if(t==1){
            sfl(x),sfl(val);
            update(1,1,n,timein[x],timeout[x]-1,2*val,lv[x]);
            update(1,1,n,timein[x],timeout[x]-1,val,!lv[x]);
        }
        else{
            sfl(x);
            //cout << get(1,1,n,timein[x],lv[x]) <<"|"<<get(1,1,n,timein[x],!lv[x])<<endl;
            ll ans = a[x]+get(1,1,n,timein[x],lv[x])-get(1,1,n,timein[x],!lv[x]);
            pfl(ans);
        }
    }

    return 0;
}


#include<cstdio>
#include<vector>
#include<iostream>
using namespace std;

long long n,m,len[1000000+100],depth[1000000+100],bit[1000000+100],a[1000000+100],arr[1000000+100],cnt;
vector< long long >v[1000000+100];
bool o[1000000+100];

long long sum(long long n){
   long long ans=0;
   while(n>0){
        ans+=bit[n];
        n-=n&-n;
   }
return ans;
}

void update(long long n,long long val){
   while(n<1LL*3e5){
      bit[n]+=val;
      n+=n&-n;
   }
return;
}

void dfs(long long n){
    o[n]=true;
    cnt++;
    a[n]=cnt;
    for (long long i=0;i<v[n].size();i++){
        long long y=v[n][i];
        if (o[y])continue;
        depth[y]=depth[n]+1;
        dfs(y);
        len[n]=max(len[n],a[y]);
    }
return;
}

int main()
{

  cin>>n>>m;
  for (long long i=1;i<=n;i++)  scanf("%lld",&arr[i]),len[i]=1;

depth[1]=0;

    for (long long i=1;i<n;i++){
        long long x,y;
        scanf("%lld %lld",&x,&y);
        v[x].push_back(y);
        v[y].push_back(x);
    }
dfs(1);
for (int i=1;i<=n;i++)if (len[i]==1)len[i]=a[i];

for (long long i=1;i<=m;i++){

    long long x,y,val;
    scanf("%lld",&x);
    if (x==2){
        scanf("%lld",&y);
            long long ans=sum(a[y]);
            if (depth[y]%2==1)ans*=-1;
        printf("%lld\n",ans+arr[y]);
    continue;
    }
    scanf("%lld %lld",&y,&val);
    long long temp=val;
    if (depth[y]%2==1)val=-val;
    temp=-val;

    update(a[y],val);
    update(len[y]+1,temp);
}

return 0;
}


#include<cstdio>
#include<vector>
#include<iostream>
using namespace std;

long long n,m,len[1000000+100],depth[1000000+100],bit[1000000+100],a[1000000+100],arr[1000000+100],cnt;
vector< long long >v[1000000+100];
bool o[1000000+100];

long long sum(long long n){
   long long ans=0;
   while(n>0){
        ans+=bit[n];
        n-=n&-n;
   }
return ans;
}

void update(long long n,long long val){
   while(n<1LL*3e5){
      bit[n]+=val;
      n+=n&-n;
   }
return;
}

void dfs(long long n){
    o[n]=true;
    cnt++;
    a[n]=cnt;
    for (long long i=0;i<v[n].size();i++){
        long long y=v[n][i];
        if (o[y])continue;
        depth[y]=depth[n]+1;
        dfs(y);
        len[n]=max(len[n],len[y]);
    }
    len[n] = max(len[n],a[n]);
return;
}

int main()
{

  cin>>n>>m;
  for (long long i=1;i<=n;i++)  scanf("%lld",&arr[i]),len[i]=1;

depth[1]=0;

    for (long long i=1;i<n;i++){
        long long x,y;
        scanf("%lld %lld",&x,&y);
        v[x].push_back(y);
        v[y].push_back(x);
    }

dfs(1);
for (int i=1;i<=n;i++)if (len[i]==1)len[i]=a[i];

for (long long i=1;i<=m;i++){

    long long x,y,val;
    scanf("%lld",&x);
    if (x==2){
        scanf("%lld",&y);
            long long ans=sum(a[y]);
            if (depth[y]%2==1)ans*=(-1);
        printf("%lld\n",ans+arr[y]);
    continue;
    }
    scanf("%lld %lld",&y,&val);
    long long temp=val;
    if (depth[y]%2==1)val=-val;
    temp=-val;

    update(a[y],val);
    update(len[y]+1,temp);
}

return 0;
}
/*
10 11

114 868 664 99 956 278 374 294 474 726

2 6

2 5

3 9

5 8

2 4

8 10

2 3

1 2

5 7

2 4

2 9

2 8

2 2

1 4 326

1 9 664

1 1 494

1 1 25

1 6 1

1 6 522

2 5

*/


#include<cstdio>
#include<vector>
#include<iostream>
using namespace std;

long long n,m,len[1000000+100],depth[1000000+100],bit[1000000+100],a[1000000+100],arr[1000000+100],cnt;
vector< long long >v[1000000+100];
bool o[1000000+100];

long long sum(long long n){
   long long ans=0;
   while(n>0){
        ans+=bit[n];
        n-=n&-n;
   }
return ans;
}

void update(long long n,long long val){
   while(n<1LL*3e5){
      bit[n]+=val;
      n+=n&-n;
   }
return;
}

void dfs(long long n){
    o[n]=true;
    cnt++;
    a[n]=cnt;
    for (long long i=0;i<v[n].size();i++){
        long long y=v[n][i];
        if (o[y])continue;
        depth[y]=depth[n]+1;
        dfs(y);
        len[n]=max(len[n],max(a[y],len[y]));
    }
return;
}

int main()
{

  cin>>n>>m;
  for (long long i=1;i<=n;i++)  scanf("%lld",&arr[i]),len[i]=1;

depth[1]=0;

    for (long long i=1;i<n;i++){
        long long x,y;
        scanf("%lld %lld",&x,&y);
        v[x].push_back(y);
        v[y].push_back(x);
    }

dfs(1);
for (int i=1;i<=n;i++)if (len[i]==1)len[i]=a[i];

for (long long i=1;i<=m;i++){

    long long x,y,val;
    scanf("%lld",&x);
    if (x==2){
        scanf("%lld",&y);
            long long ans=sum(a[y]);
            if (depth[y]%2==1)ans*=(-1);
        printf("%lld\n",ans+arr[y]);
    continue;
    }
    scanf("%lld %lld",&y,&val);
    long long temp=val;
    if (depth[y]%2==1)val=-val;
    temp=-val;

    update(a[y],val);
    update(len[y]+1,temp);
}

return 0;
}
/*
10 11

114 868 664 99 956 278 374 294 474 726

2 6

2 5

3 9

5 8

2 4

8 10

2 3

1 2

5 7

2 4

2 9

2 8

2 2

1 4 326

1 9 664

1 1 494

1 1 25

1 6 1

1 6 522

2 5

*/


#include<cstdio>
#include<vector>
#include<iostream>
using namespace std;
int n,m,a[1000000+100],otac[1000000+100];long long suma[1000000+100];
bool o[1000000+100];
vector< int >v[1000000+100];
void dfs(int x){
   o[x]=true;
   for (int i=0;i<v[x].size();i++){
        int y=v[x][i];
        if (o[y])continue;
        otac[y]=x;
        dfs(y);
   }
return;
}

int main()
{
    cin>>n>>m;
    for (int i=1;i<=n;i++)  scanf("%d",&a[i]);
    for (int i=1;i<n;i++){
        int x,y;
        scanf("%d %d",&x,&y);
        v[x].push_back(y);
        v[y].push_back(x);
    }

    dfs(1);
    while(m--){
        int x,y,z;
        scanf("%d",&x);
        if (x==1){
            scanf("%d %d",&y,&z);
            suma[y]+=1LL*z;
            continue;
        }
        scanf("%d",&y);
      long long ans=1LL*a[y]+suma[y];
      int pok1=0;
      int temp=otac[y];
      while(1){
        if (temp==0)break;
        if (pok1%2==0)ans+=(-1)*suma[temp];
        else
         ans+=suma[temp];
        pok1++;
         temp=otac[temp];
      }
      printf("%lld\n",ans);
    }

return 0;
}


#include <bits/stdc++.h>

using namespace std;

long long timer;
long long n, m;
vector <int> g[400001];
long long first[400001];
long long a[400001];
long long last[400001];
long long d[400001];
int u[400001];

struct node {
	long long val = 0, to = 0;
	bool need = 0;
}t[1000001], t1[1000001];;

void dfs (int v, long long ok) {
	u[v] = 1;
	d[v] = ok % 2;
	first[v] = ++ timer;
	for (int i = 0;i < g[v].size ();i ++) {
		if (!u[g[v][i]]) {
			dfs (g[v][i], ok + 1);
		}
	}
	last[v] = ++timer;
}

void push1 (int v, long long tl, long long tr) {
	if (t1[v].need == 0) return;
	t1[v].val += t1[v].to * (tr - tl + 1);
	if (tl != tr) {
		t1[v + v].to += t1[v].to;
		t1[v + v + 1].to += t1[v].to;
		t1[v + v].need = 1;
		t1[v + v + 1].need = 1;
	}
	t1[v].need = 0;
	t1[v].to = 0;
}

void upd1 (long long l, long long r, long long asd, int v = 1, long long tl = 1, long long tr = timer) {
	push1 (v, tl, tr);
	if (tr < l || tl > r) return;
	if (tl >= l && tr <= r) {
		t1[v].to += asd;
		t1[v].need = 1;
		push1 (v, tl, tr);
		return;
	}
	long long tm = (tl + tr) / 2;
	upd1 (l, r, asd, v + v, tl, tm);
	upd1 (l, r, asd, v + v + 1, tm + 1, tr);
	t1[v].val = t1[v + v].val + t1[v + v + 1].val;
}

long long get1 (long long l, long long r, int v = 1, long long tl = 1, long long tr = timer) {
	push1 (v, tl, tr);
	if (tr < l || tl > r) return 0ll;
	if (tl >= l && tr <= r) return t1[v].val;
	long long tm = (tl + tr) / 2;
	return get1 (l, r, v + v, tl, tm) + get1 (l, r, v + v + 1, tm + 1, tr);
}

void push (int v, long long tl, long long tr) {
	if (t[v].need == 0) return;
	t[v].val += t[v].to * (tr - tl + 1);
	if (tl != tr) {
		t[v + v].to += t[v].to;
		t[v + v + 1].to += t[v].to;
		t[v + v].need = 1;
		t[v + v + 1].need = 1;
	}
	t[v].need = 0;
	t[v].to = 0;
}

void upd (long long l, long long r, long long asd, int v = 1, long long tl = 1, long long tr = timer) {
	push (v, tl, tr);
	if (tr < l || tl > r) return;
	if (tl >= l && tr <= r) {
		t[v].to += asd;
		t[v].need = 1;
		push (v, tl, tr);
		return;
	}
	long long tm = (tl + tr) / 2;
	upd (l, r, asd, v + v, tl, tm);
	upd (l, r, asd, v + v + 1, tm + 1, tr);
	t[v].val = t[v + v].val + t[v + v + 1].val;
}

long long get (long long l, long long r, int v = 1, long long tl = 1, long long tr = timer) {
	push (v, tl, tr);
	if (tr < l || tl > r) return 0ll;
	if (tl >= l && tr <= r) return t[v].val;
	long long tm = (tl + tr) / 2;
	return get (l, r, v + v, tl, tm) + get (l, r, v + v + 1, tm + 1, tr);
}

int main () {
	ios_base::sync_with_stdio (0);
	cin.tie (0), cout.tie (0);
	cin >> n >> m;
	for (int i = 1;i <= n;i ++) {
		cin >> a[i];
	}
	for (int i = 1;i < n;i ++) {
		int x, y;
		cin >> x >> y;
		g[x].push_back (y);
		g[y].push_back (x);
	}
	dfs (1, 0);
	for (int i = 1;i <= n;i ++) {
		if (d[i] % 2 == 0) {
			upd (first[i], first[i], a[i]);
			upd (last[i], last[i], a[i]);
		}
		else {
			upd1 (last[i], last[i], a[i]);
			upd1 (first[i], first[i], a[i]);
		}
	}
	while (m --) {
		int type;
		cin >> type;
		if (type == 1) {
			long long id, qwe;
			cin >> id >> qwe;
			if (d[id] % 2 == 0) {
				upd (first[id], last[id], qwe);
				upd1 (first[id], last[id], -qwe);
			}
			else {
				upd1 (first[id], last[id], qwe);
				upd (first[id], last[id], -qwe);
			}
		}
		else {
			long long x;
			cin >> x;
			if (d[x] % 2 == 0) {
				cout << min (get (last[x], last[x]), get (first[x], first[x]));
			}
			else
				cout << min (get1 (last[x], last[x]), get1 (first[x], first[x]));
			cout << endl;
		}
	}
	return 0;
}


#include <bits/stdc++.h>
#define int long long

using namespace std;

long long timer;
long long n, m;
vector <int> g[800001];
long long first[800001];
long long a[800001];
long long last[800001];
long long d[800001];
int u[400001];

struct node {
	long long val = 0, to = 0;
	bool need = 0;
}t[2000001], t1[2000001];;

void dfs (int v, long long ok) {
	u[v] = 1;
	ok %= 2;
	d[v] = ok;
	first[v] = ++ timer;
	for (int i = 0;i < g[v].size ();i ++) {
		if (!u[g[v][i]]) {
			dfs (g[v][i], ok + 1);
		}
	}
	last[v] = ++timer;
}

void push1 (long long v, long long tl, long long tr) {
	if (t1[v].need == 0) return;
	t1[v].val += t1[v].to * (tr - tl + 1);
	if (tl != tr) {
		t1[v + v].to += t1[v].to;
		t1[v + v + 1].to += t1[v].to;
		t1[v + v].need = 1;
		t1[v + v + 1].need = 1;
	}
	t1[v].need = 0;
	t1[v].to = 0;
}

void upd1 (long long l, long long r, long long asd, long long v = 1, long long tl = 1, long long tr = timer) {
	push1 (v, tl, tr);
	if (tr < l || tl > r) return;
	if (tl >= l && tr <= r) {
		t1[v].to += asd;
		t1[v].need = 1;
		push1 (v, tl, tr);
		return;
	}
	long long tm = (tl + tr) / 2;
	upd1 (l, r, asd, v + v, tl, tm);
	upd1 (l, r, asd, v + v + 1, tm + 1, tr);
	t1[v].val = t1[v + v].val + t1[v + v + 1].val;
}

long long get1 (long long l, long long r, long long v = 1, long long tl = 1, long long tr = timer) {
	push1 (v, tl, tr);
	if (tr < l || tl > r) return 0ll;
	if (tl >= l && tr <= r) return t1[v].val;
	long long tm = (tl + tr) / 2;
	return get1 (l, r, v + v, tl, tm) + get1 (l, r, v + v + 1, tm + 1, tr);
}

void push (long long v, long long tl, long long tr) {
	if (t[v].need == 0) return;
	t[v].val += t[v].to * (tr - tl + 1);
	if (tl != tr) {
		t[v + v].to += t[v].to;
		t[v + v + 1].to += t[v].to;
		t[v + v].need = 1;
		t[v + v + 1].need = 1;
	}
	t[v].need = 0;
	t[v].to = 0;
}

void upd (long long l, long long r, long long asd, long long v = 1, long long tl = 1, long long tr = timer) {
	push (v, tl, tr);
	if (tr < l || tl > r) return;
	if (tl >= l && tr <= r) {
		t[v].to += asd;
		t[v].need = 1;
		push (v, tl, tr);
		return;
	}
	long long tm = (tl + tr) / 2;
	upd (l, r, asd, v + v, tl, tm);
	upd (l, r, asd, v + v + 1, tm + 1, tr);
	t[v].val = t[v + v].val + t[v + v + 1].val;
}

long long get (long long l, long long r, long long v = 1, long long tl = 1, long long tr = timer) {
	push (v, tl, tr);
	if (tr < l || tl > r) return 0ll;
	if (tl >= l && tr <= r) return t[v].val;
	long long tm = (tl + tr) / 2;
	return get (l, r, v + v, tl, tm) + get (l, r, v + v + 1, tm + 1, tr);
}

main () {
	ios_base::sync_with_stdio (0);
	cin.tie (0), cout.tie (0);
	cin >> n >> m;
	for (int i = 1;i <= n;i ++) {
		cin >> a[i];
	}
	for (int i = 1;i < n;i ++) {
		int x, y;
		cin >> x >> y;
		g[x].push_back (y);
		g[y].push_back (x);
	}
	dfs (1, 0);
	for (int i = 1;i <= n;i ++) {
		if (d[i] % 2 == 0) {
			upd (first[i], first[i], a[i]);
			upd (last[i], last[i], a[i]);
		}
		else {
			upd1 (last[i], last[i], a[i]);
			upd1 (first[i], first[i], a[i]);
		}
	}
	while (m --) {
		int type;
		cin >> type;
		if (type == 1) {
			long long id, qwe;
			cin >> id >> qwe;
			if (d[id] % 2 == 0) {
				upd (first[id], last[id], qwe);
				upd1 (first[id], last[id], -qwe);
			}
			else {
				upd1 (first[id], last[id], qwe);
				upd (first[id], last[id], -qwe);
			}
		}
		else {
			long long x;
			cin >> x;
			if (d[x] % 2 == 0) {
				cout << max (get (last[x], last[x]), get (first[x], first[x]));
			}
			else
				cout << max (get1 (last[x], last[x]), get1 (first[x], first[x]));
			cout << endl;
		}
	}
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

int timer;
int n, m;
vector <int> g[400001];
int b[200001];
int first[400001];
int a[400001];
int last[400001];
int d[400001];
int u[400001];

struct node {
	int val = 0, to = 0;
	bool need = 0;
}t[1000001], t1[1000001];;

void dfs (int v, int ok) {
	u[v] = 1;
	d[v] = ok;
	first[v] = ++ timer;
	b[timer] = v;
	for (int i = 0;i < g[v].size ();i ++) {
		if (!u[g[v][i]]) {
			dfs (g[v][i], ok + 1);
		}
	}
	last[v] = ++timer;
	b[timer] = v;
}

void push1 (int v, int tl, int tr) {
	if (t1[v].need == 0) return;
	t1[v].val += t1[v].to * (tr - tl + 1);
	if (tl != tr) {
		t1[v + v].to += t1[v].to;
		t1[v + v + 1].to += t1[v].to;
		t1[v + v].need = 1;
		t1[v + v + 1].need = 1;
	}
	t1[v].need = 0;
	t1[v].to = 0;
}

void upd1 (int l, int r, int asd, int v = 1, int tl = 1, int tr = timer) {
	push1 (v, tl, tr);
	if (tr < l || tl > r) return;
	if (tl >= l && tr <= r) {
		t1[v].to += asd;
		t1[v].need = 1;
		push1 (v, tl, tr);
		return;
	}
	int tm = (tl + tr) / 2;
	upd1 (l, r, asd, v + v, tl, tm);
	upd1 (l, r, asd, v + v + 1, tm + 1, tr);
	t1[v].val = t1[v + v].val + t1[v + v + 1].val;
}

int get1 (int l, int r, int v = 1, int tl = 1, int tr = timer) {
	push1 (v, tl, tr);
	if (tr < l || tl > r) return 0;
	if (tl >= l && tr <= r) return t1[v].val;
	int tm = (tl + tr) / 2;
	return get1 (l, r, v + v, tl, tm) + get1 (l, r, v + v + 1, tm + 1, tr);
}

void push (int v, int tl, int tr) {
	if (t[v].need == 0) return;
	t[v].val += t[v].to * (tr - tl + 1);
	if (tl != tr) {
		t[v + v].to += t[v].to;
		t[v + v + 1].to += t[v].to;
		t[v + v].need = 1;
		t[v + v + 1].need = 1;
	}
	t[v].need = 0;
	t[v].to = 0;
}

void upd (int l, int r, int asd, int v = 1, int tl = 1, int tr = timer) {
	push (v, tl, tr);
	if (tr < l || tl > r) return;
	if (tl >= l && tr <= r) {
		t[v].to += asd;
		t[v].need = 1;
		push (v, tl, tr);
		return;
	}
	int tm = (tl + tr) / 2;
	upd (l, r, asd, v + v, tl, tm);
	upd (l, r, asd, v + v + 1, tm + 1, tr);
	t[v].val = t[v + v].val + t[v + v + 1].val;
}

int get (int l, int r, int v = 1, int tl = 1, int tr = timer) {
	push (v, tl, tr);
	if (tr < l || tl > r) return 0;
	if (tl >= l && tr <= r) return t[v].val;
	int tm = (tl + tr) / 2;
	return get (l, r, v + v, tl, tm) + get (l, r, v + v + 1, tm + 1, tr);
}

int main () {
	cin >> n >> m;
	for (int i = 1;i <= n;i ++) {
		cin >> a[i];
	}
	for (int i = 1;i < n;i ++) {
		int x, y;
		cin >> x >> y;
		g[x].push_back (y);
		g[y].push_back (x);
	}
	dfs (1, 0);
	for (int i = 1;i <= n;i ++) {
		if (d[i] % 2 == 0) {
			upd (first[i], first[i], a[i]);
			upd (last[i], last[i], a[i]);
		}
		else {
			upd1 (last[i], last[i], a[i]);
			upd1 (first[i], first[i], a[i]);
		}
	}
	while (m --) {
		int type;
		cin >> type;
		if (type == 1) {
			int id, qwe;
			cin >> id >> qwe;
			if (d[id] % 2 == 0) {
				upd (first[id], last[id], qwe);
				upd1 (first[id], last[id], -qwe);
			}
			else {
				upd1 (first[id], last[id], qwe);
				upd (first[id], last[id], -qwe);
			}
		}
		else {
			int x;
			cin >> x;
			if (d[x] % 2 == 0) {
				cout << get (first[x], first[x]);
			}
			else cout << get1 (first[x], first[x]);
			cout << endl;
		}
	}
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

long long timer;
long long n, m;
vector <int> g[400001];
long long first[400001];
long long a[400001];
long long last[400001];
long long d[400001];
int u[400001];

struct node {
	long long val = 0, to = 0;
	bool need = 0;
}t[1000001], t1[1000001];;

void dfs (int v, long long ok) {
	u[v] = 1;
	d[v] = ok;
	first[v] = ++ timer;
	for (int i = 0;i < g[v].size ();i ++) {
		if (!u[g[v][i]]) {
			dfs (g[v][i], ok + 1);
		}
	}
	last[v] = ++timer;
}

void push1 (int v, int tl, int tr) {
	if (t1[v].need == 0) return;
	t1[v].val += t1[v].to * (tr - tl + 1);
	if (tl != tr) {
		t1[v + v].to += t1[v].to;
		t1[v + v + 1].to += t1[v].to;
		t1[v + v].need = 1;
		t1[v + v + 1].need = 1;
	}
	t1[v].need = 0;
	t1[v].to = 0;
}

void upd1 (int l, int r, long long asd, int v = 1, int tl = 1, int tr = timer) {
	push1 (v, tl, tr);
	if (tr < l || tl > r) return;
	if (tl >= l && tr <= r) {
		t1[v].to += asd;
		t1[v].need = 1;
		push1 (v, tl, tr);
		return;
	}
	int tm = (tl + tr) / 2;
	upd1 (l, r, asd, v + v, tl, tm);
	upd1 (l, r, asd, v + v + 1, tm + 1, tr);
	t1[v].val = t1[v + v].val + t1[v + v + 1].val;
}

long long get1 (int l, int r, int v = 1, int tl = 1, int tr = timer) {
	push1 (v, tl, tr);
	if (tr < l || tl > r) return 0ll;
	if (tl >= l && tr <= r) return t1[v].val;
	int tm = (tl + tr) / 2;
	return get1 (l, r, v + v, tl, tm) + get1 (l, r, v + v + 1, tm + 1, tr);
}

void push (int v, int tl, int tr) {
	if (t[v].need == 0) return;
	t[v].val += t[v].to * (tr - tl + 1);
	if (tl != tr) {
		t[v + v].to += t[v].to;
		t[v + v + 1].to += t[v].to;
		t[v + v].need = 1;
		t[v + v + 1].need = 1;
	}
	t[v].need = 0;
	t[v].to = 0;
}

void upd (int l, int r, long long asd, int v = 1, int tl = 1, int tr = timer) {
	push (v, tl, tr);
	if (tr < l || tl > r) return;
	if (tl >= l && tr <= r) {
		t[v].to += asd;
		t[v].need = 1;
		push (v, tl, tr);
		return;
	}
	int tm = (tl + tr) / 2;
	upd (l, r, asd, v + v, tl, tm);
	upd (l, r, asd, v + v + 1, tm + 1, tr);
	t[v].val = t[v + v].val + t[v + v + 1].val;
}

long long get (int l, int r, int v = 1, int tl = 1, int tr = timer) {
	push (v, tl, tr);
	if (tr < l || tl > r) return 0ll;
	if (tl >= l && tr <= r) return t[v].val;
	int tm = (tl + tr) / 2;
	return get (l, r, v + v, tl, tm) + get (l, r, v + v + 1, tm + 1, tr);
}

int main () {
	ios_base::sync_with_stdio (0);
	cin.tie (0), cout.tie (0);
	cin >> n >> m;
	for (int i = 1;i <= n;i ++) {
		cin >> a[i];
	}
	for (int i = 1;i < n;i ++) {
		int x, y;
		cin >> x >> y;
		g[x].push_back (y);
		g[y].push_back (x);
	}
	dfs (1, 0);
	for (int i = 1;i <= n;i ++) {
		if (d[i] % 2 == 0) {
			upd (first[i], first[i], a[i]);
			upd (last[i], last[i], a[i]);
		}
		else {
			upd1 (last[i], last[i], a[i]);
			upd1 (first[i], first[i], a[i]);
		}
	}
	while (m --) {
		int type;
		cin >> type;
		if (type == 1) {
			long long id, qwe;
			cin >> id >> qwe;
			if (d[id] % 2 == 0) {
				upd (first[id], last[id], qwe);
				upd1 (first[id], last[id], -qwe);
			}
			else {
				upd1 (first[id], last[id], qwe);
				upd (first[id], last[id], -qwe);
			}
		}
		else {
			long long x;
			cin >> x;
			if (d[x] % 2 == 0) {
				cout << get (first[x], first[x]);
			}
			else cout << get1 (first[x], first[x]);
			cout << endl;
		}
	}
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

long long timer;
long long n, m;
vector <int> g[400001];
long long first[400001];
long long a[400001];
long long last[400001];
long long d[400001];
int u[400001];

struct node {
	long long val = 0, to = 0;
	bool need = 0;
}t[1000001], t1[1000001];;

void dfs (int v, long long ok) {
	u[v] = 1;
	d[v] = ok % 2;
	first[v] = ++ timer;
	for (int i = 0;i < g[v].size ();i ++) {
		if (!u[g[v][i]]) {
			dfs (g[v][i], ok + 1);
		}
	}
	last[v] = ++timer;
}

void push1 (int v, long long tl, long long tr) {
	if (t1[v].need == 0) return;
	t1[v].val += t1[v].to * (tr - tl + 1);
	if (tl != tr) {
		t1[v + v].to += t1[v].to;
		t1[v + v + 1].to += t1[v].to;
		t1[v + v].need = 1;
		t1[v + v + 1].need = 1;
	}
	t1[v].need = 0;
	t1[v].to = 0;
}

void upd1 (long long l, long long r, long long asd, int v = 1, long long tl = 1, long long tr = timer) {
	push1 (v, tl, tr);
	if (tr < l || tl > r) return;
	if (tl >= l && tr <= r) {
		t1[v].to += asd;
		t1[v].need = 1;
		push1 (v, tl, tr);
		return;
	}
	long long tm = (tl + tr) / 2;
	upd1 (l, r, asd, v + v, tl, tm);
	upd1 (l, r, asd, v + v + 1, tm + 1, tr);
	t1[v].val = t1[v + v].val + t1[v + v + 1].val;
}

long long get1 (long long l, long long r, int v = 1, long long tl = 1, long long tr = timer) {
	push1 (v, tl, tr);
	if (tr < l || tl > r) return 0ll;
	if (tl >= l && tr <= r) return t1[v].val;
	long long tm = (tl + tr) / 2;
	return get1 (l, r, v + v, tl, tm) + get1 (l, r, v + v + 1, tm + 1, tr);
}

void push (int v, long long tl, long long tr) {
	if (t[v].need == 0) return;
	t[v].val += t[v].to * (tr - tl + 1);
	if (tl != tr) {
		t[v + v].to += t[v].to;
		t[v + v + 1].to += t[v].to;
		t[v + v].need = 1;
		t[v + v + 1].need = 1;
	}
	t[v].need = 0;
	t[v].to = 0;
}

void upd (long long l, long long r, long long asd, int v = 1, long long tl = 1, long long tr = timer) {
	push (v, tl, tr);
	if (tr < l || tl > r) return;
	if (tl >= l && tr <= r) {
		t[v].to += asd;
		t[v].need = 1;
		push (v, tl, tr);
		return;
	}
	long long tm = (tl + tr) / 2;
	upd (l, r, asd, v + v, tl, tm);
	upd (l, r, asd, v + v + 1, tm + 1, tr);
	t[v].val = t[v + v].val + t[v + v + 1].val;
}

long long get (long long l, long long r, int v = 1, long long tl = 1, long long tr = timer) {
	push (v, tl, tr);
	if (tr < l || tl > r) return 0ll;
	if (tl >= l && tr <= r) return t[v].val;
	long long tm = (tl + tr) / 2;
	return get (l, r, v + v, tl, tm) + get (l, r, v + v + 1, tm + 1, tr);
}

int main () {
	ios_base::sync_with_stdio (0);
	cin.tie (0), cout.tie (0);
	cin >> n >> m;
	for (int i = 1;i <= n;i ++) {
		cin >> a[i];
	}
	for (int i = 1;i < n;i ++) {
		int x, y;
		cin >> x >> y;
		g[x].push_back (y);
		g[y].push_back (x);
	}
	dfs (1, 0);
	for (int i = 1;i <= n;i ++) {
		if (d[i] % 2 == 0) {
			upd (first[i], first[i], a[i]);
			upd (last[i], last[i], a[i]);
		}
		else {
			upd1 (last[i], last[i], a[i]);
			upd1 (first[i], first[i], a[i]);
		}
	}
	while (m --) {
		int type;
		cin >> type;
		if (type == 1) {
			long long id, qwe;
			cin >> id >> qwe;
	//		if (d[id] % 2 == 0) {
				upd (first[id], last[id], qwe);
				upd1 (first[id], last[id], -qwe);
	//		}
	//		else {
	//		upd1 (first[id], last[id], qwe);
	//			upd (first[id], last[id], -qwe);
	//		}
		}
		else {
			long long x;
			cin >> x;
			if (d[x] % 2 == 0) {
				cout << min (get (last[x], last[x]), get (first[x], first[x]));
			}
			else
				cout << min (get1 (last[x], last[x]), get1 (first[x], first[x]));
			cout << endl;
		}
	}
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

long long timer;
long long n, m;
vector <int> g[400001];
long long first[400001];
long long a[400001];
long long last[400001];
long long d[400001];
int u[400001];

struct node {
	long long val = 0, to = 0;
	bool need = 0;
}t[1000001], t1[1000001];;

void dfs (int v, long long ok) {
	u[v] = 1;
	d[v] = ok;
	first[v] = ++ timer;
	for (int i = 0;i < g[v].size ();i ++) {
		if (!u[g[v][i]]) {
			dfs (g[v][i], ok + 1);
		}
	}
	last[v] = ++timer;
}

void push1 (int v, int tl, int tr) {
	if (t1[v].need == 0) return;
	t1[v].val += t1[v].to * (tr - tl + 1);
	if (tl != tr) {
		t1[v + v].to += t1[v].to;
		t1[v + v + 1].to += t1[v].to;
		t1[v + v].need = 1;
		t1[v + v + 1].need = 1;
	}
	t1[v].need = 0;
	t1[v].to = 0;
}

void upd1 (int l, int r, long long asd, int v = 1, int tl = 1, int tr = timer) {
	push1 (v, tl, tr);
	if (tr < l || tl > r) return;
	if (tl >= l && tr <= r) {
		t1[v].to += asd;
		t1[v].need = 1;
		push1 (v, tl, tr);
		return;
	}
	int tm = (tl + tr) / 2;
	upd1 (l, r, asd, v + v, tl, tm);
	upd1 (l, r, asd, v + v + 1, tm + 1, tr);
	t1[v].val = t1[v + v].val + t1[v + v + 1].val;
}

long long get1 (int l, int r, int v = 1, int tl = 1, int tr = timer) {
	push1 (v, tl, tr);
	if (tr < l || tl > r) return 0ll;
	if (tl >= l && tr <= r) return t1[v].val;
	int tm = (tl + tr) / 2;
	return get1 (l, r, v + v, tl, tm) + get1 (l, r, v + v + 1, tm + 1, tr);
}

void push (int v, int tl, int tr) {
	if (t[v].need == 0) return;
	t[v].val += t[v].to * (tr - tl + 1);
	if (tl != tr) {
		t[v + v].to += t[v].to;
		t[v + v + 1].to += t[v].to;
		t[v + v].need = 1;
		t[v + v + 1].need = 1;
	}
	t[v].need = 0;
	t[v].to = 0;
}

void upd (int l, int r, long long asd, int v = 1, int tl = 1, int tr = timer) {
	push (v, tl, tr);
	if (tr < l || tl > r) return;
	if (tl >= l && tr <= r) {
		t[v].to += asd;
		t[v].need = 1;
		push (v, tl, tr);
		return;
	}
	int tm = (tl + tr) / 2;
	upd (l, r, asd, v + v, tl, tm);
	upd (l, r, asd, v + v + 1, tm + 1, tr);
	t[v].val = t[v + v].val + t[v + v + 1].val;
}

long long get (int l, int r, int v = 1, int tl = 1, int tr = timer) {
	push (v, tl, tr);
	if (tr < l || tl > r) return 0ll;
	if (tl >= l && tr <= r) return t[v].val;
	int tm = (tl + tr) / 2;
	return get (l, r, v + v, tl, tm) + get (l, r, v + v + 1, tm + 1, tr);
}

int main () {
	cin >> n >> m;
	for (int i = 1;i <= n;i ++) {
		cin >> a[i];
	}
	for (int i = 1;i < n;i ++) {
		int x, y;
		cin >> x >> y;
		g[x].push_back (y);
		g[y].push_back (x);
	}
	dfs (1, 0);
	for (int i = 1;i <= n;i ++) {
		if (d[i] % 2 == 0) {
			upd (first[i], first[i], a[i]);
			upd (last[i], last[i], a[i]);
		}
		else {
			upd1 (last[i], last[i], a[i]);
			upd1 (first[i], first[i], a[i]);
		}
	}
	while (m --) {
		int type;
		cin >> type;
		if (type == 1) {
			long long id, qwe;
			cin >> id >> qwe;
			if (d[id] % 2 == 0) {
				upd (first[id], last[id], qwe);
				upd1 (first[id], last[id], -qwe);
			}
			else {
				upd1 (first[id], last[id], qwe);
				upd (first[id], last[id], -qwe);
			}
		}
		else {
			long long x;
			cin >> x;
			if (d[x] % 2 == 0) {
				cout << get (first[x], first[x]);
			}
			else cout << get1 (first[x], first[x]);
			cout << endl;
		}
	}
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

long long timer;
long long n, m;
vector <int> g[400001];
long long first[400001];
long long a[400001];
long long last[400001];
long long d[400001];
int u[400001];

struct node {
	long long val = 0, to = 0;
	bool need = 0;
}t[1000001], t1[1000001];;

void dfs (int v, long long ok) {
	u[v] = 1;
	d[v] = ok;
	first[v] = ++ timer;
	for (int i = 0;i < g[v].size ();i ++) {
		if (!u[g[v][i]]) {
			dfs (g[v][i], ok + 1);
		}
	}
	last[v] = ++timer;
}

void push1 (int v, int tl, int tr) {
	if (t1[v].need == 0) return;
	t1[v].val += t1[v].to * (tr - tl + 1);
	if (tl != tr) {
		t1[v + v].to += t1[v].to;
		t1[v + v + 1].to += t1[v].to;
		t1[v + v].need = 1;
		t1[v + v + 1].need = 1;
	}
	t1[v].need = 0;
	t1[v].to = 0;
}

void upd1 (int l, int r, long long asd, int v = 1, int tl = 1, int tr = timer) {
	push1 (v, tl, tr);
	if (tr < l || tl > r) return;
	if (tl >= l && tr <= r) {
		t1[v].to += asd;
		t1[v].need = 1;
		push1 (v, tl, tr);
		return;
	}
	int tm = (tl + tr) / 2;
	upd1 (l, r, asd, v + v, tl, tm);
	upd1 (l, r, asd, v + v + 1, tm + 1, tr);
	t1[v].val = t1[v + v].val + t1[v + v + 1].val;
}

long long get1 (int l, int r, int v = 1, int tl = 1, int tr = timer) {
	push1 (v, tl, tr);
	if (tr < l || tl > r) return 0ll;
	if (tl >= l && tr <= r) return t1[v].val;
	int tm = (tl + tr) / 2;
	return get1 (l, r, v + v, tl, tm) + get1 (l, r, v + v + 1, tm + 1, tr);
}

void push (int v, int tl, int tr) {
	if (t[v].need == 0) return;
	t[v].val += t[v].to * (tr - tl + 1);
	if (tl != tr) {
		t[v + v].to += t[v].to;
		t[v + v + 1].to += t[v].to;
		t[v + v].need = 1;
		t[v + v + 1].need = 1;
	}
	t[v].need = 0;
	t[v].to = 0;
}

void upd (int l, int r, long long asd, int v = 1, int tl = 1, int tr = timer) {
	push (v, tl, tr);
	if (tr < l || tl > r) return;
	if (tl >= l && tr <= r) {
		t[v].to += asd;
		t[v].need = 1;
		push (v, tl, tr);
		return;
	}
	int tm = (tl + tr) / 2;
	upd (l, r, asd, v + v, tl, tm);
	upd (l, r, asd, v + v + 1, tm + 1, tr);
	t[v].val = t[v + v].val + t[v + v + 1].val;
}

long long get (int l, int r, int v = 1, int tl = 1, int tr = timer) {
	push (v, tl, tr);
	if (tr < l || tl > r) return 0ll;
	if (tl >= l && tr <= r) return t[v].val;
	int tm = (tl + tr) / 2;
	return get (l, r, v + v, tl, tm) + get (l, r, v + v + 1, tm + 1, tr);
}

int main () {
    ios_base::sync_with_stdio (0);
    cin.tie (0), cout.tie (0);
	cin >> n >> m;
	for (int i = 1;i <= n;i ++) {
		cin >> a[i];
	}
	for (int i = 1;i < n;i ++) {
		int x, y;
		cin >> x >> y;
		g[x].push_back (y);
		g[y].push_back (x);
	}
	dfs (1, 0);
	for (int i = 1;i <= n;i ++) {
		if (d[i] % 2 == 0) {
			upd (first[i], first[i], a[i]);
			upd (last[i], last[i], a[i]);
		}
		else {
			upd1 (last[i], last[i], a[i]);
			upd1 (first[i], first[i], a[i]);
		}
	}
	while (m --) {
		int type;
		cin >> type;
		if (type == 1) {
			long long id, qwe;
			cin >> id >> qwe;
			if (d[id] % 2 == 0) {
				upd (first[id], last[id], qwe);
				upd1 (first[id], last[id], -qwe);
			}
			else {
				upd1 (first[id], last[id], qwe);
				upd (first[id], last[id], -qwe);
			}
		}
		else {
			long long x;
			cin >> x;
			if (d[x] % 2 == 0) {
				cout << get (first[x], first[x]);
			}
			else cout << get1 (first[x], first[x]);
			cout << endl;
		}
	}
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

int timer;
int n, m;
vector <int> g[100001];
int b[100001];
int first[100001];
int a[100001];
int last[100001];
int d[100001];
int u[100001];

struct node {
	int val = 0, to = 0;
	bool need = 0;
}t[400001], t1[400001];;

void dfs (int v, int ok) {
	u[v] = 1;
	d[v] = ok;
	first[v] = ++ timer;
	b[timer] = v;
	for (int i = 0;i < g[v].size ();i ++) {
		if (!u[g[v][i]]) {
			dfs (g[v][i], ok + 1);
		}
	}
	last[v] = ++timer;
	b[timer] = v;
}

void push1 (int v, int tl, int tr) {
	if (t1[v].need == 0) return;
	t1[v].val += t1[v].to * (tr - tl + 1);
	if (tl != tr) {
		t1[v + v].to += t1[v].to;
		t1[v + v + 1].to += t1[v].to;
		t1[v + v].need = 1;
		t1[v + v + 1].need = 1;
	}
	t1[v].need = 0;
	t1[v].to = 0;
}

void upd1 (int l, int r, int asd, int v = 1, int tl = 1, int tr = timer) {
	push1 (v, tl, tr);
	if (tr < l || tl > r) return;
	if (tl >= l && tr <= r) {
		t1[v].to += asd;
		t1[v].need = 1;
		push1 (v, tl, tr);
		return;
	}
	int tm = (tl + tr) / 2;
	upd1 (l, r, asd, v + v, tl, tm);
	upd1 (l, r, asd, v + v + 1, tm + 1, tr);
	t1[v].val = t1[v + v].val + t1[v + v + 1].val;
}

int get1 (int l, int r, int v = 1, int tl = 1, int tr = timer) {
	push1 (v, tl, tr);
	if (tr < l || tl > r) return 0;
	if (tl >= l && tr <= r) return t1[v].val;
	int tm = (tl + tr) / 2;
	return get1 (l, r, v + v, tl, tm) + get1 (l, r, v + v + 1, tm + 1, tr);
}

void push (int v, int tl, int tr) {
	if (t[v].need == 0) return;
	t[v].val += t[v].to * (tr - tl + 1);
	if (tl != tr) {
		t[v + v].to += t[v].to;
		t[v + v + 1].to += t[v].to;
		t[v + v].need = 1;
		t[v + v + 1].need = 1;
	}
	t[v].need = 0;
	t[v].to = 0;
}

void upd (int l, int r, int asd, int v = 1, int tl = 1, int tr = timer) {
	push (v, tl, tr);
	if (tr < l || tl > r) return;
	if (tl >= l && tr <= r) {
		t[v].to += asd;
		t[v].need = 1;
		push (v, tl, tr);
		return;
	}
	int tm = (tl + tr) / 2;
	upd (l, r, asd, v + v, tl, tm);
	upd (l, r, asd, v + v + 1, tm + 1, tr);
	t[v].val = t[v + v].val + t[v + v + 1].val;
}

int get (int l, int r, int v = 1, int tl = 1, int tr = timer) {
	push (v, tl, tr);
	if (tr < l || tl > r) return 0;
	if (tl >= l && tr <= r) return t[v].val;
	int tm = (tl + tr) / 2;
	return get (l, r, v + v, tl, tm) + get (l, r, v + v + 1, tm + 1, tr);
}

int main () {
	cin >> n >> m;
	for (int i = 1;i <= n;i ++) {
		cin >> a[i];
	}
	for (int i = 1;i < n;i ++) {
		int x, y;
		cin >> x >> y;
		g[x].push_back (y);
		g[y].push_back (x);
	}
	dfs (1, 0);
	for (int i = 1;i <= n;i ++) {
		if (d[i] % 2 == 0) {
			upd (first[i], first[i], a[i]);
			upd (last[i], last[i], a[i]);
		}
		else {
			upd1 (last[i], last[i], a[i]);
			upd1 (first[i], first[i], a[i]);
		}
	}
	while (m --) {
		int type;
		cin >> type;
		if (type == 1) {
			int id, qwe;
			cin >> id >> qwe;
			if (d[id] % 2 == 0) {
				upd (first[id], last[id], qwe);
				upd1 (first[id], last[id], -qwe);
			}
			else {
				upd1 (first[id], last[id], qwe);
				upd (first[id], last[id], -qwe);
			}
		}
		else {
			int x;
			cin >> x;
			if (d[x] % 2 == 0) {
				cout << get (first[x], first[x]);
			}
			else cout << get1 (first[x], first[x]);
			cout << endl;
		}
	}
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

long long timer;
long long n, m;
vector <int> g[400001];
long long first[400001];
long long a[400001];
long long last[400001];
long long d[400001];
int u[400001];

struct node {
	long long val = 0, to = 0;
	bool need = 0;
}t[1000001], t1[1000001];;

void dfs (int v, long long ok) {
	u[v] = 1;
	ok %= 2;
	d[v] = ok;
	first[v] = ++ timer;
	for (int i = 0;i < g[v].size ();i ++) {
		if (!u[g[v][i]]) {
			dfs (g[v][i], ok + 1);
		}
	}
	last[v] = ++timer;
}

void push1 (long long v, long long tl, long long tr) {
	if (t1[v].need == 0) return;
	t1[v].val += t1[v].to * (tr - tl + 1);
	if (tl != tr) {
		t1[v + v].to += t1[v].to;
		t1[v + v + 1].to += t1[v].to;
		t1[v + v].need = 1;
		t1[v + v + 1].need = 1;
	}
	t1[v].need = 0;
	t1[v].to = 0;
}

void upd1 (long long l, long long r, long long asd, long long v = 1, long long tl = 1, long long tr = timer) {
	push1 (v, tl, tr);
	if (tr < l || tl > r) return;
	if (tl >= l && tr <= r) {
		t1[v].to += asd;
		t1[v].need = 1;
		push1 (v, tl, tr);
		return;
	}
	long long tm = (tl + tr) / 2;
	upd1 (l, r, asd, v + v, tl, tm);
	upd1 (l, r, asd, v + v + 1, tm + 1, tr);
	t1[v].val = t1[v + v].val + t1[v + v + 1].val;
}

long long get1 (long long l, long long r, long long v = 1, long long tl = 1, long long tr = timer) {
	push1 (v, tl, tr);
	if (tr < l || tl > r) return 0ll;
	if (tl >= l && tr <= r) return t1[v].val;
	long long tm = (tl + tr) / 2;
	return get1 (l, r, v + v, tl, tm) + get1 (l, r, v + v + 1, tm + 1, tr);
}

void push (long long v, long long tl, long long tr) {
	if (t[v].need == 0) return;
	t[v].val += t[v].to * (tr - tl + 1);
	if (tl != tr) {
		t[v + v].to += t[v].to;
		t[v + v + 1].to += t[v].to;
		t[v + v].need = 1;
		t[v + v + 1].need = 1;
	}
	t[v].need = 0;
	t[v].to = 0;
}

void upd (long long l, long long r, long long asd, long long v = 1, long long tl = 1, long long tr = timer) {
	push (v, tl, tr);
	if (tr < l || tl > r) return;
	if (tl >= l && tr <= r) {
		t[v].to += asd;
		t[v].need = 1;
		push (v, tl, tr);
		return;
	}
	long long tm = (tl + tr) / 2;
	upd (l, r, asd, v + v, tl, tm);
	upd (l, r, asd, v + v + 1, tm + 1, tr);
	t[v].val = t[v + v].val + t[v + v + 1].val;
}

long long get (long long l, long long r, long long v = 1, long long tl = 1, long long tr = timer) {
	push (v, tl, tr);
	if (tr < l || tl > r) return 0ll;
	if (tl >= l && tr <= r) return t[v].val;
	long long tm = (tl + tr) / 2;
	return get (l, r, v + v, tl, tm) + get (l, r, v + v + 1, tm + 1, tr);
}

int main () {
	ios_base::sync_with_stdio (0);
	cin.tie (0), cout.tie (0);
	cin >> n >> m;
	for (int i = 1;i <= n;i ++) {
		cin >> a[i];
	}
	for (int i = 1;i < n;i ++) {
		int x, y;
		cin >> x >> y;
		g[x].push_back (y);
		g[y].push_back (x);
	}
	dfs (1, 0);
	for (int i = 1;i <= n;i ++) {
		if (d[i] % 2 == 0) {
			upd (first[i], first[i], a[i]);
			upd (last[i], last[i], a[i]);
		}
		else {
			upd1 (last[i], last[i], a[i]);
			upd1 (first[i], first[i], a[i]);
		}
	}
	while (m --) {
		int type;
		cin >> type;
		if (type == 1) {
			long long id, qwe;
			cin >> id >> qwe;
			if (d[id] % 2 == 0) {
				upd (first[id], last[id], qwe);
				upd1 (first[id], last[id], -qwe);
			}
			else {
				upd1 (first[id], last[id], qwe);
				upd (first[id], last[id], -qwe);
			}
		}
		else {
			long long x;
			cin >> x;
			if (d[x] % 2 == 0) {
				cout << min (get (last[x], last[x]), get (first[x], first[x]));
			}
			else
				cout << min (get1 (last[x], last[x]), get1 (first[x], first[x]));
			cout << endl;
		}
	}
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

long long timer;
long long n, m;
vector <int> g[400001];
long long first[400001];
long long a[400001];
long long last[400001];
long long d[400001];
int u[400001];

struct node {
	long long val = 0, to = 0;
	bool need = 0;
}t[1000001], t1[1000001];;

void dfs (int v, long long ok) {
	u[v] = 1;
	d[v] = ok;
	first[v] = ++ timer;
	for (int i = 0;i < g[v].size ();i ++) {
		if (!u[g[v][i]]) {
			dfs (g[v][i], ok + 1);
		}
	}
	last[v] = ++timer;
}

void push1 (int v, long long tl, long long tr) {
	if (t1[v].need == 0) return;
	t1[v].val += t1[v].to * (tr - tl + 1);
	if (tl != tr) {
		t1[v + v].to += t1[v].to;
		t1[v + v + 1].to += t1[v].to;
		t1[v + v].need = 1;
		t1[v + v + 1].need = 1;
	}
	t1[v].need = 0;
	t1[v].to = 0;
}

void upd1 (long long l, long long r, long long asd, int v = 1, long long tl = 1, long long tr = timer) {
	push1 (v, tl, tr);
	if (tr < l || tl > r) return;
	if (tl >= l && tr <= r) {
		t1[v].to += asd;
		t1[v].need = 1;
		push1 (v, tl, tr);
		return;
	}
	long long tm = (tl + tr) / 2;
	upd1 (l, r, asd, v + v, tl, tm);
	upd1 (l, r, asd, v + v + 1, tm + 1, tr);
	t1[v].val = t1[v + v].val + t1[v + v + 1].val;
}

long long get1 (long long l, long long r, int v = 1, long long tl = 1, long long tr = timer) {
	push1 (v, tl, tr);
	if (tr < l || tl > r) return 0ll;
	if (tl >= l && tr <= r) return t1[v].val;
	long long tm = (tl + tr) / 2;
	return get1 (l, r, v + v, tl, tm) + get1 (l, r, v + v + 1, tm + 1, tr);
}

void push (int v, long long tl, long long tr) {
	if (t[v].need == 0) return;
	t[v].val += t[v].to * (tr - tl + 1);
	if (tl != tr) {
		t[v + v].to += t[v].to;
		t[v + v + 1].to += t[v].to;
		t[v + v].need = 1;
		t[v + v + 1].need = 1;
	}
	t[v].need = 0;
	t[v].to = 0;
}

void upd (long long l, long long r, long long asd, int v = 1, long long tl = 1, long long tr = timer) {
	push (v, tl, tr);
	if (tr < l || tl > r) return;
	if (tl >= l && tr <= r) {
		t[v].to += asd;
		t[v].need = 1;
		push (v, tl, tr);
		return;
	}
	long long tm = (tl + tr) / 2;
	upd (l, r, asd, v + v, tl, tm);
	upd (l, r, asd, v + v + 1, tm + 1, tr);
	t[v].val = t[v + v].val + t[v + v + 1].val;
}

long long get (long long l, long long r, int v = 1, long long tl = 1, long long tr = timer) {
	push (v, tl, tr);
	if (tr < l || tl > r) return 0ll;
	if (tl >= l && tr <= r) return t[v].val;
	long long tm = (tl + tr) / 2;
	return get (l, r, v + v, tl, tm) + get (l, r, v + v + 1, tm + 1, tr);
}

int main () {
	ios_base::sync_with_stdio (0);
	cin.tie (0), cout.tie (0);
	cin >> n >> m;
	for (int i = 1;i <= n;i ++) {
		cin >> a[i];
	}
	for (int i = 1;i < n;i ++) {
		int x, y;
		cin >> x >> y;
		g[x].push_back (y);
		g[y].push_back (x);
	}
	dfs (1, 0);
	for (int i = 1;i <= n;i ++) {
		if (d[i] % 2 == 0) {
			upd (first[i], first[i], a[i]);
			upd (last[i], last[i], a[i]);
		}
		else {
			upd1 (last[i], last[i], a[i]);
			upd1 (first[i], first[i], a[i]);
		}
	}
	while (m --) {
		int type;
		cin >> type;
		if (type == 1) {
			long long id, qwe;
			cin >> id >> qwe;
			if (d[id] % 2 == 0) {
				upd (first[id], last[id], qwe);
				upd1 (first[id], last[id], -qwe);
			}
			else {
				upd1 (first[id], last[id], qwe);
				upd (first[id], last[id], -qwe);
			}
		}
		else {
			long long x;
			cin >> x;
			if (d[x] % 2 == 0) {
				cout << get (last[x], last[x]);
			}
			else cout << get1 (last[x], last[x]);
			cout << endl;
		}
	}
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

long long timer;
long long n, m;
vector <int> g[400001];
long long first[400001];
long long a[400001];
long long last[400001];
long long d[400001];
int u[400001];

struct node {
	long long val = 0, to = 0;
	bool need = 0;
}t[800001], t1[800001];;

void dfs (int v, long long ok) {
	u[v] = 1;
	d[v] = ok;
	first[v] = ++ timer;
	for (int i = 0;i < g[v].size ();i ++) {
		if (!u[g[v][i]]) {
			dfs (g[v][i], ok + 1);
		}
	}
	last[v] = ++timer;
}

void push1 (int v, int tl, int tr) {
	if (t1[v].need == 0) return;
	t1[v].val += t1[v].to * (tr - tl + 1);
	if (tl != tr) {
		t1[v + v].to += t1[v].to;
		t1[v + v + 1].to += t1[v].to;
		t1[v + v].need = 1;
		t1[v + v + 1].need = 1;
	}
	t1[v].need = 0;
	t1[v].to = 0;
}

void upd1 (int l, int r, long long asd, int v = 1, int tl = 1, int tr = timer) {
	push1 (v, tl, tr);
	if (tr < l || tl > r) return;
	if (tl >= l && tr <= r) {
		t1[v].to += asd;
		t1[v].need = 1;
		push1 (v, tl, tr);
		return;
	}
	int tm = (tl + tr) / 2;
	upd1 (l, r, asd, v + v, tl, tm);
	upd1 (l, r, asd, v + v + 1, tm + 1, tr);
	t1[v].val = t1[v + v].val + t1[v + v + 1].val;
}

long long get1 (int l, int r, int v = 1, int tl = 1, int tr = timer) {
	push1 (v, tl, tr);
	if (tr < l || tl > r) return 0;
	if (tl >= l && tr <= r) return t1[v].val;
	int tm = (tl + tr) / 2;
	return get1 (l, r, v + v, tl, tm) + get1 (l, r, v + v + 1, tm + 1, tr);
}

void push (int v, int tl, int tr) {
	if (t[v].need == 0) return;
	t[v].val += t[v].to * (tr - tl + 1);
	if (tl != tr) {
		t[v + v].to += t[v].to;
		t[v + v + 1].to += t[v].to;
		t[v + v].need = 1;
		t[v + v + 1].need = 1;
	}
	t[v].need = 0;
	t[v].to = 0;
}

void upd (int l, int r, long long asd, int v = 1, int tl = 1, int tr = timer) {
	push (v, tl, tr);
	if (tr < l || tl > r) return;
	if (tl >= l && tr <= r) {
		t[v].to += asd;
		t[v].need = 1;
		push (v, tl, tr);
		return;
	}
	int tm = (tl + tr) / 2;
	upd (l, r, asd, v + v, tl, tm);
	upd (l, r, asd, v + v + 1, tm + 1, tr);
	t[v].val = t[v + v].val + t[v + v + 1].val;
}

long long get (int l, int r, int v = 1, int tl = 1, int tr = timer) {
	push (v, tl, tr);
	if (tr < l || tl > r) return 0ll;
	if (tl >= l && tr <= r) return t[v].val;
	int tm = (tl + tr) / 2;
	return get (l, r, v + v, tl, tm) + get (l, r, v + v + 1, tm + 1, tr);
}

int main () {
	cin >> n >> m;
	for (int i = 1;i <= n;i ++) {
		cin >> a[i];
	}
	for (int i = 1;i < n;i ++) {
		int x, y;
		cin >> x >> y;
		g[x].push_back (y);
		g[y].push_back (x);
	}
	dfs (1, 0);
	for (int i = 1;i <= n;i ++) {
		if (d[i] % 2 == 0) {
			upd (first[i], first[i], a[i]);
			upd (last[i], last[i], a[i]);
		}
		else {
			upd1 (last[i], last[i], a[i]);
			upd1 (first[i], first[i], a[i]);
		}
	}
	while (m --) {
		int type;
		cin >> type;
		if (type == 1) {
			long long id, qwe;
			cin >> id >> qwe;
			if (d[id] % 2 == 0) {
				upd (first[id], last[id], qwe);
				upd1 (first[id], last[id], -qwe);
			}
			else {
				upd1 (first[id], last[id], qwe);
				upd (first[id], last[id], -qwe);
			}
		}
		else {
			long long x;
			cin >> x;
			if (d[x] % 2 == 0) {
				cout << get (first[x], first[x]);
			}
			else cout << get1 (first[x], first[x]);
			cout << endl;
		}
	}
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

int timer;
int n, m;
vector <int> g[200001];
int b[200001];
int first[200001];
int a[200001];
int last[200001];
int d[200001];
int u[200001];

struct node {
	int val = 0, to = 0;
	bool need = 0;
}t[800001], t1[800001];;

void dfs (int v, int ok) {
	u[v] = 1;
	d[v] = ok;
	first[v] = ++ timer;
	b[timer] = v;
	for (int i = 0;i < g[v].size ();i ++) {
		if (!u[g[v][i]]) {
			dfs (g[v][i], ok + 1);
		}
	}
	last[v] = ++timer;
	b[timer] = v;
}

void push1 (int v, int tl, int tr) {
	if (t1[v].need == 0) return;
	t1[v].val += t1[v].to * (tr - tl + 1);
	if (tl != tr) {
		t1[v + v].to += t1[v].to;
		t1[v + v + 1].to += t1[v].to;
		t1[v + v].need = 1;
		t1[v + v + 1].need = 1;
	}
	t1[v].need = 0;
	t1[v].to = 0;
}

void upd1 (int l, int r, int asd, int v = 1, int tl = 1, int tr = timer) {
	push1 (v, tl, tr);
	if (tr < l || tl > r) return;
	if (tl >= l && tr <= r) {
		t1[v].to += asd;
		t1[v].need = 1;
		push1 (v, tl, tr);
		return;
	}
	int tm = (tl + tr) / 2;
	upd1 (l, r, asd, v + v, tl, tm);
	upd1 (l, r, asd, v + v + 1, tm + 1, tr);
	t1[v].val = t1[v + v].val + t1[v + v + 1].val;
}

int get1 (int l, int r, int v = 1, int tl = 1, int tr = timer) {
	push1 (v, tl, tr);
	if (tr < l || tl > r) return 0;
	if (tl >= l && tr <= r) return t1[v].val;
	int tm = (tl + tr) / 2;
	return get1 (l, r, v + v, tl, tm) + get1 (l, r, v + v + 1, tm + 1, tr);
}

void push (int v, int tl, int tr) {
	if (t[v].need == 0) return;
	t[v].val += t[v].to * (tr - tl + 1);
	if (tl != tr) {
		t[v + v].to += t[v].to;
		t[v + v + 1].to += t[v].to;
		t[v + v].need = 1;
		t[v + v + 1].need = 1;
	}
	t[v].need = 0;
	t[v].to = 0;
}

void upd (int l, int r, int asd, int v = 1, int tl = 1, int tr = timer) {
	push (v, tl, tr);
	if (tr < l || tl > r) return;
	if (tl >= l && tr <= r) {
		t[v].to += asd;
		t[v].need = 1;
		push (v, tl, tr);
		return;
	}
	int tm = (tl + tr) / 2;
	upd (l, r, asd, v + v, tl, tm);
	upd (l, r, asd, v + v + 1, tm + 1, tr);
	t[v].val = t[v + v].val + t[v + v + 1].val;
}

int get (int l, int r, int v = 1, int tl = 1, int tr = timer) {
	push (v, tl, tr);
	if (tr < l || tl > r) return 0;
	if (tl >= l && tr <= r) return t[v].val;
	int tm = (tl + tr) / 2;
	return get (l, r, v + v, tl, tm) + get (l, r, v + v + 1, tm + 1, tr);
}

int main () {
	cin >> n >> m;
	for (int i = 1;i <= n;i ++) {
		cin >> a[i];
	}
	for (int i = 1;i < n;i ++) {
		int x, y;
		cin >> x >> y;
		g[x].push_back (y);
		g[y].push_back (x);
	}
	dfs (1, 0);
	for (int i = 1;i <= n;i ++) {
		if (d[i] % 2 == 0) {
			upd (first[i], first[i], a[i]);
			upd (last[i], last[i], a[i]);
		}
		else {
			upd1 (last[i], last[i], a[i]);
			upd1 (first[i], first[i], a[i]);
		}
	}
	while (m --) {
		int type;
		cin >> type;
		if (type == 1) {
			int id, qwe;
			cin >> id >> qwe;
			if (d[id] % 2 == 0) {
				upd (first[id], last[id], qwe);
				upd1 (first[id], last[id], -qwe);
			}
			else {
				upd1 (first[id], last[id], qwe);
				upd (first[id], last[id], -qwe);
			}
		}
		else {
			int x;
			cin >> x;
			if (d[x] % 2 == 0) {
				cout << get (first[x], first[x]);
			}
			else cout << get1 (first[x], first[x]);
			cout << endl;
		}
	}
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

int timer;
int n, m;
vector <int> g[200001];
int b[200001];
int first[400001];
int a[400001];
int last[400001];
int d[200001];
int u[200001];

struct node {
	int val = 0, to = 0;
	bool need = 0;
}t[1000001], t1[1000001];;

void dfs (int v, int ok) {
	u[v] = 1;
	d[v] = ok;
	first[v] = ++ timer;
	b[timer] = v;
	for (int i = 0;i < g[v].size ();i ++) {
		if (!u[g[v][i]]) {
			dfs (g[v][i], ok + 1);
		}
	}
	last[v] = ++timer;
	b[timer] = v;
}

void push1 (int v, int tl, int tr) {
	if (t1[v].need == 0) return;
	t1[v].val += t1[v].to * (tr - tl + 1);
	if (tl != tr) {
		t1[v + v].to += t1[v].to;
		t1[v + v + 1].to += t1[v].to;
		t1[v + v].need = 1;
		t1[v + v + 1].need = 1;
	}
	t1[v].need = 0;
	t1[v].to = 0;
}

void upd1 (int l, int r, int asd, int v = 1, int tl = 1, int tr = timer) {
	push1 (v, tl, tr);
	if (tr < l || tl > r) return;
	if (tl >= l && tr <= r) {
		t1[v].to += asd;
		t1[v].need = 1;
		push1 (v, tl, tr);
		return;
	}
	int tm = (tl + tr) / 2;
	upd1 (l, r, asd, v + v, tl, tm);
	upd1 (l, r, asd, v + v + 1, tm + 1, tr);
	t1[v].val = t1[v + v].val + t1[v + v + 1].val;
}

int get1 (int l, int r, int v = 1, int tl = 1, int tr = timer) {
	push1 (v, tl, tr);
	if (tr < l || tl > r) return 0;
	if (tl >= l && tr <= r) return t1[v].val;
	int tm = (tl + tr) / 2;
	return get1 (l, r, v + v, tl, tm) + get1 (l, r, v + v + 1, tm + 1, tr);
}

void push (int v, int tl, int tr) {
	if (t[v].need == 0) return;
	t[v].val += t[v].to * (tr - tl + 1);
	if (tl != tr) {
		t[v + v].to += t[v].to;
		t[v + v + 1].to += t[v].to;
		t[v + v].need = 1;
		t[v + v + 1].need = 1;
	}
	t[v].need = 0;
	t[v].to = 0;
}

void upd (int l, int r, int asd, int v = 1, int tl = 1, int tr = timer) {
	push (v, tl, tr);
	if (tr < l || tl > r) return;
	if (tl >= l && tr <= r) {
		t[v].to += asd;
		t[v].need = 1;
		push (v, tl, tr);
		return;
	}
	int tm = (tl + tr) / 2;
	upd (l, r, asd, v + v, tl, tm);
	upd (l, r, asd, v + v + 1, tm + 1, tr);
	t[v].val = t[v + v].val + t[v + v + 1].val;
}

int get (int l, int r, int v = 1, int tl = 1, int tr = timer) {
	push (v, tl, tr);
	if (tr < l || tl > r) return 0;
	if (tl >= l && tr <= r) return t[v].val;
	int tm = (tl + tr) / 2;
	return get (l, r, v + v, tl, tm) + get (l, r, v + v + 1, tm + 1, tr);
}

int main () {
	cin >> n >> m;
	for (int i = 1;i <= n;i ++) {
		cin >> a[i];
	}
	for (int i = 1;i < n;i ++) {
		int x, y;
		cin >> x >> y;
		g[x].push_back (y);
		g[y].push_back (x);
	}
	dfs (1, 0);
	for (int i = 1;i <= n;i ++) {
		if (d[i] % 2 == 0) {
			upd (first[i], first[i], a[i]);
			upd (last[i], last[i], a[i]);
		}
		else {
			upd1 (last[i], last[i], a[i]);
			upd1 (first[i], first[i], a[i]);
		}
	}
	while (m --) {
		int type;
		cin >> type;
		if (type == 1) {
			int id, qwe;
			cin >> id >> qwe;
			if (d[id] % 2 == 0) {
				upd (first[id], last[id], qwe);
				upd1 (first[id], last[id], -qwe);
			}
			else {
				upd1 (first[id], last[id], qwe);
				upd (first[id], last[id], -qwe);
			}
		}
		else {
			int x;
			cin >> x;
			if (d[x] % 2 == 0) {
				cout << get (first[x], first[x]);
			}
			else cout << get1 (first[x], first[x]);
			cout << endl;
		}
	}
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

long long timer;
long long n, m;
vector <int> g[400001];
long long first[400001];
long long a[400001];
long long last[400001];
long long d[400001];
int u[400001];

struct node {
	long long val = 0, to = 0;
	bool need = 0;
}t[800001], t1[800001];;

void dfs (int v, long long ok) {
	u[v] = 1;
	d[v] = ok;
	first[v] = ++ timer;
	for (int i = 0;i < g[v].size ();i ++) {
		if (!u[g[v][i]]) {
			dfs (g[v][i], ok + 1);
		}
	}
	last[v] = ++timer;
}

void push1 (int v, int tl, int tr) {
	if (t1[v].need == 0) return;
	t1[v].val += t1[v].to * (tr - tl + 1);
	if (tl != tr) {
		t1[v + v].to += t1[v].to;
		t1[v + v + 1].to += t1[v].to;
		t1[v + v].need = 1;
		t1[v + v + 1].need = 1;
	}
	t1[v].need = 0;
	t1[v].to = 0;
}

void upd1 (int l, int r, long long asd, int v = 1, int tl = 1, int tr = timer) {
	push1 (v, tl, tr);
	if (tr < l || tl > r) return;
	if (tl >= l && tr <= r) {
		t1[v].to += asd;
		t1[v].need = 1;
		push1 (v, tl, tr);
		return;
	}
	int tm = (tl + tr) / 2;
	upd1 (l, r, asd, v + v, tl, tm);
	upd1 (l, r, asd, v + v + 1, tm + 1, tr);
	t1[v].val = t1[v + v].val + t1[v + v + 1].val;
}

long long get1 (int l, int r, int v = 1, int tl = 1, int tr = timer) {
	push1 (v, tl, tr);
	if (tr < l || tl > r) return 0;
	if (tl >= l && tr <= r) return t1[v].val;
	int tm = (tl + tr) / 2;
	return get1 (l, r, v + v, tl, tm) + get1 (l, r, v + v + 1, tm + 1, tr);
}

void push (int v, int tl, int tr) {
	if (t[v].need == 0) return;
	t[v].val += t[v].to * (tr - tl + 1);
	if (tl != tr) {
		t[v + v].to += t[v].to;
		t[v + v + 1].to += t[v].to;
		t[v + v].need = 1;
		t[v + v + 1].need = 1;
	}
	t[v].need = 0;
	t[v].to = 0;
}

void upd (int l, int r, int asd, int v = 1, int tl = 1, int tr = timer) {
	push (v, tl, tr);
	if (tr < l || tl > r) return;
	if (tl >= l && tr <= r) {
		t[v].to += asd;
		t[v].need = 1;
		push (v, tl, tr);
		return;
	}
	int tm = (tl + tr) / 2;
	upd (l, r, asd, v + v, tl, tm);
	upd (l, r, asd, v + v + 1, tm + 1, tr);
	t[v].val = t[v + v].val + t[v + v + 1].val;
}

long long get (int l, int r, int v = 1, int tl = 1, int tr = timer) {
	push (v, tl, tr);
	if (tr < l || tl > r) return 0;
	if (tl >= l && tr <= r) return t[v].val;
	int tm = (tl + tr) / 2;
	return get (l, r, v + v, tl, tm) + get (l, r, v + v + 1, tm + 1, tr);
}

int main () {
	cin >> n >> m;
	for (int i = 1;i <= n;i ++) {
		cin >> a[i];
	}
	for (int i = 1;i < n;i ++) {
		int x, y;
		cin >> x >> y;
		g[x].push_back (y);
		g[y].push_back (x);
	}
	dfs (1, 0);
	for (int i = 1;i <= n;i ++) {
		if (d[i] % 2 == 0) {
			upd (first[i], first[i], a[i]);
			upd (last[i], last[i], a[i]);
		}
		else {
			upd1 (last[i], last[i], a[i]);
			upd1 (first[i], first[i], a[i]);
		}
	}
	while (m --) {
		int type;
		cin >> type;
		if (type == 1) {
			int id, qwe;
			cin >> id >> qwe;
			if (d[id] % 2 == 0) {
				upd (first[id], last[id], qwe);
				upd1 (first[id], last[id], -qwe);
			}
			else {
				upd1 (first[id], last[id], qwe);
				upd (first[id], last[id], -qwe);
			}
		}
		else {
			int x;
			cin >> x;
			if (d[x] % 2 == 0) {
				cout << get (first[x], first[x]);
			}
			else cout << get1 (first[x], first[x]);
			cout << endl;
		}
	}
	return 0;
}


#include <bits/stdc++.h>

#if DEBUG && !ONLINE_JUDGE
    #include "debug.h"
#else
    #define debug(...)
#endif

using namespace std;

/*******  All Required define Pre-Processors and typedef Constants *******/
#define scd(t) scanf("%d",&t)
#define scld(t) scanf("%ld",&t)
#define sclld(t) scanf("%lld",&t)
#define scc(t) scanf("%c",&t)
#define scs(t) scanf("%s",t)
#define scf(t) scanf("%f",&t)
#define sclf(t) scanf("%lf",&t)
#define mem(a, b) memset(a, (b), sizeof(a))
#define repd(i,k) for(ll i=k;i>=0;i--)
#define rep(i,k) for(ll i=0;i<k;i++)
#define repn(i,k1,k2) for(ll i=k1;i<=k2;i++)

#define all(cont) cont.begin(), cont.end()
#define rall(cont) cont.end(), cont.begin()
#define foreach(it, l) for (auto it = l.begin(); it != l.end(); it++)
#define in(A, B, C) assert( B <= A && A <= C)
#define mp make_pair
#define pb push_back
#define INF (int)1e9
#define EPS 1e-9
#define PI 3.1415926535897932384626433832795
#define MOD 1000000007
#define ee6 (ll)1000001
#define ee5 (ll)100001
#define read(type) readInt<type>()
#define tt ll t;cin>>t; while(t--)
typedef long long int ll;

typedef pair<ll, ll> pr;
typedef vector<ll> vi;
typedef vector<string> vs;
typedef vector<pr> vpr;
typedef vector<vpr>vvpr;
typedef vector<vi> vvi;
typedef map<ll,ll> MPII;
typedef set<ll> SETI;
typedef multiset<ll> MSETI;

 const int N=2*ee5;
 int o=1,e=1;
 int evenst[N],oddst[N],dep[N],firstchild[N],pos[N],ODD[N],EVEN[N],val[N];
vvi g(N);
void dfs(int v,int p)
{
	if(dep[v]%2){pos[v]=o;o++;ODD[pos[v]]=val[v];}
	else {pos[v]=e;e++;EVEN[pos[v]]=val[v];}

	for(auto i:g[v])
	{
		if(i==p)continue;
		dep[i]=1+dep[v];
		dfs(i,v);
		if(firstchild[v]==-1)
		firstchild[v]=i;
		evenst[v]+=evenst[i];oddst[v]+=oddst[i];
	}
	if(dep[v]%2)oddst[v]++;else evenst[v]++;
}

int add(int in,int val,int v[])
{
	while(in<=200001)
	{
		v[in]+=val;
		in+=(in&-in);
	}
}

int sum(int in,int v[])
{
	int s=0;
	while(in>0)
	{
		s+=v[in];
		in-=(in&-in);
	}
	return s;
}

int main()
{
	#if !ONLINE_JUDGE
	freopen("in.txt","r",stdin);
	#endif
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	mem(firstchild,-1);

	int n,m;cin>>n>>m;rep(i,n)cin>>val[i];
	rep(i,n-1)
	{int x,y;cin>>x>>y;x--;y--;g[x].pb(y);g[y].pb(x);}
	dfs(0,-1);
	rep(i,m)
	{
		int op,x;cin>>op>>x;x--;
		if(op==1)
		{
			int val;cin>>val;
			if(dep[x]%2){
				add(pos[x],val,ODD);add(pos[x]+oddst[x],-val,ODD);
				if(firstchild[x]==-1)continue;
				add(pos[firstchild[x]],-val,EVEN);add(pos[firstchild[x]]+evenst[x],val,EVEN);
			}
			else
			{
				add(pos[x],val,EVEN);add(pos[x]+evenst[x],-val,EVEN);
				if(firstchild[x]==-1)continue;
				add(pos[firstchild[x]],-val,ODD);add(pos[firstchild[x]]+oddst[x],val,ODD);
			}

		}
		else
		{
			if(dep[x]%2)
				cout<<sum(pos[x],ODD)<<"\n";
			else cout<<sum(pos[x],EVEN)<<"\n";
		}
	}

}