import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author unknown
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        ASequenceWithDigits solver = new ASequenceWithDigits();
        solver.solve(1, in, out);
        out.close();
    }

    static class ASequenceWithDigits {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int ntc = in.nextInt();
            while ((ntc--) > 0) {
                long n = in.nextLong();
                long k = in.nextLong();
                long ans = n;
                for (int i = 1; i < k; i++) {
                    int min = 111;
                    int max = -111;
                    while (n != 0) {
                        int m = (int) n % 10;
                        n /= 10;
                        min = Math.min(min, m);
                        max = Math.max(max, m);
                    }
                    long prev = ans;
                    ans = ans + (min * max);
                    n = ans;
                    if (prev == ans) {
                        break;
                    }
                }
                out.println(ans);
            }
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void close() {
            writer.close();
        }

        public void println(long i) {
            writer.println(i);
        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author unknown
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        ASequenceWithDigits solver = new ASequenceWithDigits();
        solver.solve(1, in, out);
        out.close();
    }

    static class ASequenceWithDigits {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int ntc = in.nextInt();
            while ((ntc--) > 0) {
                long a1 = in.nextLong();
                long k = in.nextLong();
                long ans = a1;
                for (int i = 1; i < k; i++) {
                    int min = 111;
                    int max = -111;
                    while (a1 != 0) {
                        int m = (int) (a1 % 10);
                        a1 /= 10;
                        min = Math.min(min, m);
                        max = Math.max(max, m);
                    }
                    long prev = ans;
                    ans = ans + (min * max);
                    a1 = ans;
                    if (prev == ans) {
                        break;
                    }
                }
                out.println(ans);
            }
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void close() {
            writer.close();
        }

        public void println(long i) {
            writer.println(i);
        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author unknown
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        ASequenceWithDigits solver = new ASequenceWithDigits();
        solver.solve(1, in, out);
        out.close();
    }

    static class ASequenceWithDigits {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int ntc = in.nextInt();
            while ((ntc--) > 0) {
                long n = in.nextLong();
                long k = in.nextLong();
                long ans = n;
                while (k > 1) {
                    long nn = n;
                    int min = 10;
                    int max = -1;
                    while (nn != 0) {
                        int mod = (int) nn % 10;
                        nn = nn / 10;
                        min = Math.min(min, mod);
                        max = Math.max(max, mod);
                    }
                    if (min == 0 || max == 0) {
                        break;
                    }
                    ans += (min * max);
                    n = ans;
                    k--;
                }
                out.println(ans);
            }
        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void close() {
            writer.close();
        }

        public void println(long i) {
            writer.println(i);
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}


// Codeforces
// E. Propagating tree
// http://codeforces.com/contest/384/problem/E

#include <bits/stdc++.h>
using namespace std;
#define MAX                 200100
#define EPS                 1e-9
#define INF                 1e9+10
#define MOD                 1000000007
#define pb                  push_back
#define mp                  make_pair
#define fi                  first
#define se                  second
#define pi                  acos(-1)
#define sf                  scanf
#define pf                  printf
#define SIZE(a)             ((int)a.size())
#define Equal(a, b)         (abs(a-b) < EPS)
#define Greater(a, b)       (a >= (b+EPS))
#define GreaterEqual(a, b)  (a > (b-EPS))
#define fr(i, a, b)         for(register int i = (a); i < (int)(b); i++)
#define FastRead            ios_base::sync_with_stdio(false); cin.tie(NULL);
#define dbug(vari)          cerr << #vari << " = " << (vari) <<endl
#define isOn(S, j)          (S & (1 << j))
#define setBit(S, j)        (S |= (1 << j))
#define clearBit(S, j)      (S &= ~(1 << j))
#define toggleBit(S, j)     (S ^= (1 << j))
#define lowBit(S)           (S & (-S))
#define setAll(S, n)        (S = (1 << n) - 1)
#define fileRead(S)         freopen(S, "r", stdin);
#define fileWrite(S)        freopen(S, "w", stdout);
#define Unique(X)           X.erase(unique(X.begin(), X.end()), X.end())

typedef unsigned long long ull;
typedef long long ll;
typedef map<int, int> mii;
typedef map<ll, ll>mll;
typedef map<string, int> msi;
typedef vector<int> vi;
typedef vector<long long>vl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<pair<int, int> > vii;
typedef vector<pair<ll, ll> >vll;

vi G[MAX];
int sTime[MAX], eTime[MAX], level[MAX], cst[MAX], timer;
ll treeE[MAX], treeO[MAX];
int MaxVal = MAX-3;

void updateE(int idx, int val) {
	while(idx <= MaxVal) {
		treeE[idx] += val;
		idx += (idx & -idx);
	}
}

void updateO(int idx, int val) {
	while(idx <= MaxVal) {
		treeO[idx] += val;
		idx += (idx & -idx);
	}
}

long long readE(int idx) {
	long long sum = 0;
	while(idx > 0) {
		sum += treeE[idx];
		idx -= (idx & -idx);
	}
	return sum;
}

long long readO(int idx) {
	long long sum = 0;
	while(idx > 0) {
		sum += treeO[idx];
		idx -= (idx & -idx);
	}
	return sum;
}

void dfs(int u, int lvl) {
    sTime[u] = ++timer;
    level[u] = lvl;
    for(int i = 0; i < SIZE(G[u]); ++i) {
        if(sTime[G[u][i]] == 0)
            dfs(G[u][i], lvl+1);
        eTime[u] = timer;
    }
}

int main() {
    //fileRead("in");

    int n, q, u, v, x, t;
    sf("%d %d", &n, &q);

    for(int i = 1; i <= n; ++i)
        sf("%d", &cst[i]);

    for(int i = 1; i < n; ++i) {
        sf("%d %d", &u, &v);
        G[u].pb(v);
        G[v].pb(u);
    }

    memset(sTime, 0, sizeof sTime);
    memset(treeE, 0, sizeof treeE);
    memset(treeO, 0, sizeof treeO);

    timer = 0;
    dfs(1, 1);

    if(n == 1) {
        level[1] = 1;
        sTime[1] = eTime[1] = 1;
    }

    while(q--) {
        sf("%d", &t);

        if(t == 1) {
            sf("%d %d", &u, &x);
            if(level[u]%2 == 0) {
                //pf("Eve node %d : %d %d val %d\n", u, sTime[u], eTime[u], x);
                updateE(sTime[u], x);
                updateE(eTime[u]+1, -x);
                updateO(sTime[u], -x);
                updateO(eTime[u]+1, x);
            }
            else {
                //pf("Odd node %d : %d %d val %d\n", u, sTime[u], eTime[u], x);
                updateE(sTime[u], -x);
                updateE(eTime[u]+1, x);
                updateO(sTime[u], x);
                updateO(eTime[u]+1, -x);
            }
        }
        else {
            sf("%d", &u);
            //pf("sTime[%d] = %d\n", u, sTime[u]);
            if(level[u]%2 == 0) {
                //cout << "E* " << readSingleE(sTime[u]) << endl;
                pf("%lld\n", cst[u]+readE(sTime[u]));
            }
            else {
                //cout << "O* " << readSingleO(sTime[u]) << endl;
                pf("%lld\n", cst[u]+readO(sTime[u]));
            }
        }
    }

    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define MAX                 200100
#define EPS                 1e-9
#define INF                 1e9+10
#define MOD                 1000000007
#define pb                  push_back
#define mp                  make_pair
#define fi                  first
#define se                  second
#define pi                  acos(-1)
#define sf                  scanf
#define pf                  printf
#define SIZE(a)             ((int)a.size())
#define Equal(a, b)         (abs(a-b) < EPS)
#define Greater(a, b)       (a >= (b+EPS))
#define GreaterEqual(a, b)  (a > (b-EPS))
#define fr(i, a, b)         for(register int i = (a); i < (int)(b); i++)
#define FastRead            ios_base::sync_with_stdio(false); cin.tie(NULL);
#define dbug(vari)          cerr << #vari << " = " << (vari) <<endl
#define isOn(S, j)          (S & (1 << j))
#define setBit(S, j)        (S |= (1 << j))
#define clearBit(S, j)      (S &= ~(1 << j))
#define toggleBit(S, j)     (S ^= (1 << j))
#define lowBit(S)           (S & (-S))
#define setAll(S, n)        (S = (1 << n) - 1)
#define fileRead(S)         freopen(S, "r", stdin);
#define fileWrite(S)        freopen(S, "w", stdout);
#define Unique(X)           X.erase(unique(X.begin(), X.end()), X.end())

typedef unsigned long long ull;
typedef long long ll;
typedef map<int, int> mii;
typedef map<ll, ll>mll;
typedef map<string, int> msi;
typedef vector<int> vi;
typedef vector<long long>vl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<pair<int, int> > vii;
typedef vector<pair<ll, ll> >vll;

vi G[MAX];
int sTime[MAX], eTime[MAX], level[MAX], cst[MAX], timer;
ll treeE[MAX], treeO[MAX];
int MaxVal = MAX-3;

void updateE(int idx, int val) {
	while(idx <= MaxVal) {
		treeE[idx] += val;
		idx += (idx & -idx);
	}
}

void updateO(int idx, int val) {
	while(idx <= MaxVal) {
		treeO[idx] += val;
		idx += (idx & -idx);
	}
}

long long readE(int idx) {
	long long sum = 0;
	while(idx > 0) {
		sum += treeE[idx];
		idx -= (idx & -idx);
	}
	return sum;
}

long long readO(int idx) {
	long long sum = 0;
	while(idx > 0) {
		sum += treeO[idx];
		idx -= (idx & -idx);
	}
	return sum;
}

void dfs(int u, int lvl) {
    sTime[u] = ++timer;
    level[u] = lvl;
    for(int i = 0; i < SIZE(G[u]); ++i) {
        if(sTime[G[u][i]] == 0)
            dfs(G[u][i], lvl+1);
        eTime[u] = timer;
    }
}

int main() {
    fileRead("in");

    int n, q, u, v, x, t;
    sf("%d %d", &n, &q);

    for(int i = 1; i <= n; ++i)
        sf("%d", &cst[i]);

    for(int i = 1; i < n; ++i) {
        sf("%d %d", &u, &v);
        G[u].pb(v);
        G[v].pb(u);
    }

    memset(sTime, 0, sizeof sTime);
    memset(treeE, 0, sizeof treeE);
    memset(treeO, 0, sizeof treeO);

    timer = 0;
    dfs(1, 1);

    while(q--) {
        sf("%d", &t);

        if(t == 1) {
            sf("%d %d", &u, &x);
            if(level[u]%2 == 0) {
                //pf("Eve node %d : %d %d val %d\n", u, sTime[u], eTime[u], x);
                updateE(sTime[u], x);
                updateE(eTime[u]+1, -x);
                updateO(sTime[u], -x);
                updateO(eTime[u]+1, x);
            }
            else {
                //pf("Odd node %d : %d %d val %d\n", u, sTime[u], eTime[u], x);
                updateE(sTime[u], -x);
                updateE(eTime[u]+1, x);
                updateO(sTime[u], x);
                updateO(eTime[u]+1, -x);
            }
        }
        else {
            sf("%d", &u);
            //pf("sTime[%d] = %d\n", u, sTime[u]);
            if(level[u]%2 == 0) {
                //cout << "E* " << readSingleE(sTime[u]) << endl;
                pf("%lld\n", cst[u]+readE(sTime[u]));
            }
            else {
                //cout << "O* " << readSingleO(sTime[u]) << endl;
                pf("%lld\n", cst[u]+readO(sTime[u]));
            }
        }
    }

    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef int int__;
#define int long long
#define pb push_back
#define pi pair<int,int>
#define vpi vector<pi>
#define vi vector<int>
#define vvi vector<vi>
#define fi first
#define se second
#define forn(i, n)for(int i=0;i<int__(n);i++)
#define sz(a)int__(a.size())
template <class A, class B> ostream& operator << (ostream& out, const pair<A, B> &a){return out << "(" << a.first << ", " << a.second << ")";}
template<class A>ostream& operator<<(ostream& out,const vector<A>&v){out<<"[";forn(i,sz(v)){if(i)out<<", ";out<<v[i];}return out<<"]";}
#define fast ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0)
const int mod = 1e9 + 7;
int Mod(int x){x%=mod;if(x<0)x+=mod;return x;}
int Pow(int x,int n){if(n==0)return 1;int t=Pow(x,n/2);t=Mod(t*t);if(n&1)t=Mod(t*x);return t;}
#define watch(x) cout << #x << " : " << x << endl;
int gcd(int a,int b){if(b==0)return a;return gcd(b,a%b);}
#define all(x) x.begin(), x.end()
#define db double

/* REMEMBER to use 1-based indexing in tree*/

/*adds value `val` at `idx` position in `tree` array*/
void add(vi &tree,int idx,int val) {
	while(idx < tree.size()) {
		tree[idx] += val;
		idx += (idx & (-idx));
	}
}
/*gives prefix sum till position `idx` in `tree` array*/
int sum(vi &tree,int idx) {
	int res = 0;
	while(idx > 0) {
		res += tree[idx];
		idx -= (idx & (-idx));
	}
	return res;
}

int cnt=0;
void dfs(int x,int p,vi &start,vi &end,vvi &g,int h,vi &par) {
	start[x] = ++cnt;
	par[x] = h;
	for(int y:g[x]) {
		if(y==p) continue;
		dfs(y,x,start,end,g,1-h,par);
	}
	end[x] = cnt;
}

int__ main() {
	fast;

	int n,q; cin >> n >> q;
	vi a(n+1);
	for(int i=1;i<=n;i++) cin >> a[i];

	vvi g(n+1);

	for(int i=0;i<n-1;i++) {
		int u,v; cin >> u >> v;
		g[u].pb(v); g[v].pb(u);
	}

	vi start(n+1),end(n+1),par(n+1);
	dfs(1,1,start,end,g,0,par);
	vvi tree(2, vi(n+5,0));

	for(int i=0;i<q;i++) {
		int t; cin >> t;
		if(t == 1) {
			int x,val; cin >> x >> val;
			int p = par[x];
			add(tree[p],start[x],val);
			add(tree[p],end[x]+1,-val);
		}
		else {
			int x; cin >> x;
			cout << a[x] + sum(tree[par[x]],start[x]) - sum(tree[1-par[x]],start[x]) << endl;
		}
	}

}


#include <bits/stdc++.h>

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>
using namespace __gnu_pbds;

using namespace std;

#if !ONLINE_JUDGE
#define debug
#endif

typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> ii;
typedef vector<pair<int,int> > vii;
typedef pair<ll,ll> pll;
typedef vector<vector<int> > vvi;
typedef vector<vector<ii> > vvii;

#define pb push_back
#define mp make_pair
#define all(x) x.begin(),x.end()
#define sz(x) (int)x.size()
#define fill(a,x) memset(a,x,sizeof(a))
#define ff first
#define ss second
#define trav(a, x) for(auto& a : x)
#define FOR(i,a,b) for(int i = a; i<=b; ++i)
#define NFOR(i,a,b) for(int i = a; i>=b; --i)
const ll INF = 1e18;
const int mod = 1e9 + 7;

ll gcd(ll a,ll b){if (a==0) return b;return gcd(b%a,a);}
ll lcm(ll a,ll b){return a*(b/gcd(a,b));}
ll Abs(ll a){if(a>0)return a;return -a;}
ll Ceil(ll a,ll b){if(a%b==0)return a/b;else return a/b+1;}
double Abs(double a){if(a>0)return a;return -a;}

//*X.find_by_order(2) element at index=2
//X.order_of_key(1) how many elements strictly less than 1

#define ordered_set tree<int, null_type,less_equal<int>, rb_tree_tag,tree_order_statistics_node_update>

inline int pow_(ll x, ll y,ll p){
  int r = 1; while(y){if(y & 1) r = r * x % p; y >>= 1; x = x * x % p;} return r;
}
inline int inv_(int x){return pow_(x, mod - 2, mod);}
inline int add(ll a,ll b){a += b; if(a >= mod) a -= mod; return a;}
inline int mul(int a, int b){return a * 1LL * b % mod;}
inline int sub(int a, int b){a -= b; if(a < 0) a += mod; return a;}

#ifdef debug
#define dbg(...) { cerr<<"[ "; dump(#__VA_ARGS__, __VA_ARGS__);}
#undef endl
template <typename Arg1,typename Arg2>
ostream& operator << (ostream& out, const pair<Arg1,Arg2> &x) {
    return out<<"("<<x.ff<<","<<x.ss<<")";
}

template <typename Arg1>
ostream& operator << (ostream& out, const vector<Arg1> &a) {
    out<<"[";for(const auto &x:a)out<<x<<",";return out<<"]";
}

template <typename Arg1>
ostream& operator << (ostream& out, const set<Arg1> &a) {
    out<<"[";for(const auto &x:a)out<<x<<",";return out<<"]";
}

template <typename Arg1,typename Arg2>
ostream& operator << (ostream& out, const map<Arg1,Arg2> &a) {
    out<<"[";for(const auto &x:a)out<<x<<",";return out<<"]";
}

template <typename Arg1,typename Arg2>
ostream& operator << (ostream& out, const unordered_map<Arg1,Arg2> &a) {
    out<<"[";for(const auto &x:a)out<<x<<",";return out<<"]";
}

template <typename Arg1>
void dump(const string name, Arg1&& arg1){
    cerr << name << " : " << arg1 << " ] " << endl;
}

template <typename Arg1, typename... Args>
void dump(const string names, Arg1&& arg1, Args&&... args){
    const string name = names.substr(0,names.find(','));
    cerr<<name<<" : "<<arg1<<" | ";
    dump(names.substr(1+(int)name.size()), args...);
}
#else
    #define dbg(args...)
#endif

mt19937_64 mrand(chrono::steady_clock::now().time_since_epoch().count());

const int N = 2e5+5;

int n,t1[4*N];
int lazy1[4*N] = {0};
int t2[4*N];
int lazy2[4*N] = {0};

vvi G(N);
int a[N] = {0};
int even[N] = {0};
int odd[N] = {0};
int euler1[N] = {0};
int euler2[N] = {0};
int k1 = 0;
int k2 = 0;
int pos[N][2] = {0};
int dist[N] = {0};
int left1[N] = {0};
int right1[N] = {0};

void push1(int node){
    t1[2*node] += lazy1[node];
    lazy1[2*node] += lazy1[node];
    t1[2*node+1] += lazy1[node];
    lazy1[2*node+1] += lazy1[node];
    lazy1[node] = 0;
}

void build1(int a[],int node,int tl,int tr){
    if(tl > tr){
        return;
    }

    if(tl==tr){
        t1[node]=a[tl];
        return;
    }

    int mid = (tl+tr)/2;
    build1(a,2*node,tl,mid);
    build1(a,2*node+1,mid+1,tr);
    t1[node] = t1[2*node+1] + t1[2*node];
}

ll query1(int node,int tl,int tr,int l,int r){
    if(l>r){
        return 0;
    }

    if(l==tl && r==tr){
        return t1[node];
    }

    push1(node);
    int tm = (tl+tr)/2;
    return query1(2*node,tl,tm,l,min(r,tm)) + query1(2*node+1,tm+1,tr,max(tm+1,l),r);
}

void update1(int node,int tl,int tr,int l,int r,int val){
    if(l>r){
        return;
    }

    if(l==tl && r==tr){
        t1[node] += val;
        lazy1[node] += val;
        return;
    }

    push1(node);
    int tm = (tl+tr)/2;
    update1(2*node,tl,tm,l,min(r,tm),val);
    update1(2*node+1,tm+1,tr,max(tm+1,l),r,val);
    t1[node] = t1[2*node] + t1[2*node+1];
}

void push2(int node){
    t2[2*node] += lazy2[node];
    lazy2[2*node] += lazy2[node];
    t2[2*node+1] += lazy2[node];
    lazy2[2*node+1] += lazy2[node];
    lazy2[node] = 0;
}

void build2(int a[],int node,int tl,int tr){
    if(tl > tr){
        return;
    }

    if(tl==tr){
        t2[node]=a[tl];
        return;
    }

    int mid = (tl+tr)/2;
    build2(a,2*node,tl,mid);
    build2(a,2*node+1,mid+1,tr);
    t2[node] = t2[2*node+1] + t2[2*node];
}

ll query2(int node,int tl,int tr,int l,int r){
    if(l>r){
        return 0;
    }

    if(l==tl && r==tr){
        return t2[node];
    }

    push2(node);
    int tm = (tl+tr)/2;
    return query2(2*node,tl,tm,l,min(r,tm)) + query2(2*node+1,tm+1,tr,max(tm+1,l),r);
}

void update2(int node,int tl,int tr,int l,int r,int val){
    if(l>r){
        return;
    }

    if(l==tl && r==tr){
        t2[node] += val;
        lazy2[node] += val;
        return;
    }

    push2(node);
    int tm = (tl+tr)/2;
    update2(2*node,tl,tm,l,min(r,tm),val);
    update2(2*node+1,tm+1,tr,max(tm+1,l),r,val);
    t2[node] = t2[2*node] + t2[2*node+1];
}

void dfs(int u,int p, int d){

    dist[u] = d;

    if(d%2){
        euler1[++k1] = a[u];
        pos[u][0] = k1;
    } else {
        euler2[++k2] = a[u];
        pos[u][0] = k2;
    }

    for(auto v:G[u]){
        if(v!=p){
            if(left1[u] == 0)left1[u] = v;
            right1[u] = v;
            dfs(v,u,d+1);
        }
    }

    if(d%2){
        euler1[++k1] = a[u];
        pos[u][1] = k1;
    } else {
        euler2[++k2] = a[u];
        pos[u][1] = k2;
    }
}

int main(int argc, char const *argv[])
{
    #ifdef LOCAL_TEST
    freopen("in.txt","r",stdin);
    //freopen("out.txt", "w", stdout);
    #else
    ios_base::sync_with_stdio(false);cin.tie(NULL);
    #endif
    int n,m;
    cin>>n>>m;

    for(int i=1;i<=n;i++){
        cin>>a[i];
    }

    for(int i=1;i<=n-1;i++){
        int u,v;
        cin>>u>>v;
        G[u].pb(v);
        G[v].pb(u);
    }

    dfs(1,-1,0);

    int n1 = k1;
    int n2 = k2;

    build1(euler1,1,1,n1);
    build2(euler2,1,1,n2);

    while(m--){
        int x;
        cin>>x;
        if(x == 1){
            int y,val;
            cin>>y>>val;
            int l = pos[y][0];
            int r = pos[y][1];
            int l1 = 1;
            int r1 = 0;
            if(G[y].size() > 1 || (y == 1 && G[y].size())){
                int v = left1[y];
                int w = right1[y];
                l1 = pos[v][0];
                r1 = pos[w][1];
            }
            int d = dist[y];
            if(d%2){
                update1(1,1,n1,l,r,val);
                update2(1,1,n2,l1,r1,-val);
            } else {
                update2(1,1,n2,l,r,val);
                update1(1,1,n1,l1,r1,-val);
            }
        } else {
            int u;
            cin>>u;
            int d = dist[u];
            int l = pos[u][0];
            int ans = 0;
            if(d%2){
                ans = query1(1,1,n1,l,l);
            } else {
                ans = query2(1,1,n2,l,l);
            }
            cout << ans << "\n";
        }
    }

    return 0;
}


#include <bits/stdc++.h>

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>
using namespace __gnu_pbds;

using namespace std;

#if !ONLINE_JUDGE
#define debug
#endif

typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> ii;
typedef vector<pair<int,int> > vii;
typedef pair<ll,ll> pll;
typedef vector<vector<int> > vvi;
typedef vector<vector<ii> > vvii;

#define pb push_back
#define mp make_pair
#define all(x) x.begin(),x.end()
#define sz(x) (int)x.size()
#define fill(a,x) memset(a,x,sizeof(a))
#define ff first
#define ss second
#define trav(a, x) for(auto& a : x)
#define FOR(i,a,b) for(int i = a; i<=b; ++i)
#define NFOR(i,a,b) for(int i = a; i>=b; --i)
const ll INF = 1e18;
const int mod = 1e9 + 7;

ll gcd(ll a,ll b){if (a==0) return b;return gcd(b%a,a);}
ll lcm(ll a,ll b){return a*(b/gcd(a,b));}
ll Abs(ll a){if(a>0)return a;return -a;}
ll Ceil(ll a,ll b){if(a%b==0)return a/b;else return a/b+1;}
double Abs(double a){if(a>0)return a;return -a;}

//*X.find_by_order(2) element at index=2
//X.order_of_key(1) how many elements strictly less than 1

#define ordered_set tree<int, null_type,less_equal<int>, rb_tree_tag,tree_order_statistics_node_update>

inline int pow_(ll x, ll y,ll p){
  int r = 1; while(y){if(y & 1) r = r * x % p; y >>= 1; x = x * x % p;} return r;
}
inline int inv_(int x){return pow_(x, mod - 2, mod);}
inline int add(ll a,ll b){a += b; if(a >= mod) a -= mod; return a;}
inline int mul(int a, int b){return a * 1LL * b % mod;}
inline int sub(int a, int b){a -= b; if(a < 0) a += mod; return a;}

#ifdef debug
#define dbg(...) { cerr<<"[ "; dump(#__VA_ARGS__, __VA_ARGS__);}
#undef endl
template <typename Arg1,typename Arg2>
ostream& operator << (ostream& out, const pair<Arg1,Arg2> &x) {
    return out<<"("<<x.ff<<","<<x.ss<<")";
}

template <typename Arg1>
ostream& operator << (ostream& out, const vector<Arg1> &a) {
    out<<"[";for(const auto &x:a)out<<x<<",";return out<<"]";
}

template <typename Arg1>
ostream& operator << (ostream& out, const set<Arg1> &a) {
    out<<"[";for(const auto &x:a)out<<x<<",";return out<<"]";
}

template <typename Arg1,typename Arg2>
ostream& operator << (ostream& out, const map<Arg1,Arg2> &a) {
    out<<"[";for(const auto &x:a)out<<x<<",";return out<<"]";
}

template <typename Arg1,typename Arg2>
ostream& operator << (ostream& out, const unordered_map<Arg1,Arg2> &a) {
    out<<"[";for(const auto &x:a)out<<x<<",";return out<<"]";
}

template <typename Arg1>
void dump(const string name, Arg1&& arg1){
    cerr << name << " : " << arg1 << " ] " << endl;
}

template <typename Arg1, typename... Args>
void dump(const string names, Arg1&& arg1, Args&&... args){
    const string name = names.substr(0,names.find(','));
    cerr<<name<<" : "<<arg1<<" | ";
    dump(names.substr(1+(int)name.size()), args...);
}
#else
    #define dbg(args...)
#endif

mt19937_64 mrand(chrono::steady_clock::now().time_since_epoch().count());

const int N = 2e5+5;

int n,t1[4*N];
int lazy1[4*N] = {0};
int t2[4*N];
int lazy2[4*N] = {0};

vvi G(N);
int a[N] = {0};
int even[N] = {0};
int odd[N] = {0};
int euler1[N] = {0};
int euler2[N] = {0};
int k1 = 0;
int k2 = 0;
int pos[N][2] = {0};
int dist[N] = {0};
int left1[N] = {0};
int right1[N] = {0};

void push1(int node){
	t1[2*node] += lazy1[node];
	lazy1[2*node] += lazy1[node];
	t1[2*node+1] += lazy1[node];
	lazy1[2*node+1] += lazy1[node];
	lazy1[node] = 0;
}

void build1(int a[],int node,int tl,int tr){
	if(tl > tr){
		return;
	}

	if(tl==tr){
		t1[node]=a[tl];
		return;
	}

	int mid = (tl+tr)/2;
	build1(a,2*node,tl,mid);
	build1(a,2*node+1,mid+1,tr);
	t1[node] = t1[2*node+1] + t1[2*node];
}

ll query1(int node,int tl,int tr,int l,int r){
	if(l>r){
		return 0;
	}

	if(l==tl && r==tr){
		return t1[node];
	}

	push1(node);
	int tm = (tl+tr)/2;
	return query1(2*node,tl,tm,l,min(r,tm)) + query1(2*node+1,tm+1,tr,max(tm+1,l),r);
}

void update1(int node,int tl,int tr,int l,int r,int val){
	if(l>r){
		return;
	}

	if(l==tl && r==tr){
		t1[node] += val;
		lazy1[node] += val;
		return;
	}

	push1(node);
	int tm = (tl+tr)/2;
	update1(2*node,tl,tm,l,min(r,tm),val);
	update1(2*node+1,tm+1,tr,max(tm+1,l),r,val);
	t1[node] = t1[2*node] + t1[2*node+1];
}

void push2(int node){
	t2[2*node] += lazy2[node];
	lazy2[2*node] += lazy2[node];
	t2[2*node+1] += lazy2[node];
	lazy2[2*node+1] += lazy2[node];
	lazy2[node] = 0;
}

void build2(int a[],int node,int tl,int tr){
	if(tl > tr){
		return;
	}

	if(tl==tr){
		t2[node]=a[tl];
		return;
	}

	int mid = (tl+tr)/2;
	build2(a,2*node,tl,mid);
	build2(a,2*node+1,mid+1,tr);
	t2[node] = t2[2*node+1] + t2[2*node];
}

ll query2(int node,int tl,int tr,int l,int r){
	if(l>r){
		return 0;
	}

	if(l==tl && r==tr){
		return t2[node];
	}

	push2(node);
	int tm = (tl+tr)/2;
	return query2(2*node,tl,tm,l,min(r,tm)) + query2(2*node+1,tm+1,tr,max(tm+1,l),r);
}

void update2(int node,int tl,int tr,int l,int r,int val){
	if(l>r){
		return;
	}

	if(l==tl && r==tr){
		t2[node] += val;
		lazy2[node] += val;
		return;
	}

	push2(node);
	int tm = (tl+tr)/2;
	update2(2*node,tl,tm,l,min(r,tm),val);
	update2(2*node+1,tm+1,tr,max(tm+1,l),r,val);
	t2[node] = t2[2*node] + t2[2*node+1];
}

void dfs(int u,int p, int d){

	dist[u] = d;

	if(d%2){
		euler1[++k1] = a[u];
		pos[u][0] = k1;
	} else {
		euler2[++k2] = a[u];
		pos[u][0] = k2;
	}

	for(auto v:G[u]){
		if(v!=p){
			if(left1[u] == 0)left1[u] = v;
			right1[u] = v;
			dfs(v,u,d+1);
		}
	}

	if(d%2){
		euler1[++k1] = a[u];
		pos[u][1] = k1;
	} else {
		euler2[++k2] = a[u];
		pos[u][1] = k2;
	}
}

int main(int argc, char const *argv[])
{
    #ifdef LOCAL_TEST
    freopen("in.txt","r",stdin);
    //freopen("out.txt", "w", stdout);
    #else
    ios_base::sync_with_stdio(false);cin.tie(NULL);
    #endif
    int n,m;
    cin>>n>>m;

    for(int i=1;i<=n;i++){
    	cin>>a[i];
    }

    for(int i=1;i<=n-1;i++){
    	int u,v;
    	cin>>u>>v;
    	G[u].pb(v);
    	G[v].pb(u);
    }

    dfs(1,-1,0);

    int n1 = k1;
    int n2 = k2;

    build1(euler1,1,1,n1);
    build2(euler2,1,1,n2);

    while(m--){
    	int x;
    	cin>>x;
    	if(x == 1){
    		int y,val;
    		cin>>y>>val;
    		int l = pos[y][0];
    		int r = pos[y][1];
    		int l1 = 1;
    		int r1 = 0;
    		if(G[y].size() > 1){
				int v = left1[y];
				int w = right1[y];
				l1 = pos[v][0];
				r1 = pos[w][1];
    		}
    		int d = dist[y];
    		if(d%2){
    			update1(1,1,n1,l,r,val);
    			update2(1,1,n2,l1,r1,-val);
    		} else {
    			update2(1,1,n2,l,r,val);
    			update1(1,1,n1,l1,r1,-val);
    		}
    	} else {
    		int u;
    		cin>>u;
    		int d = dist[u];
    		int l = pos[u][0];
    		int ans = 0;
    		if(d%2){
    			ans = query1(1,1,n1,l,l);
    		} else {
    			ans = query2(1,1,n2,l,l);
    		}
    		cout << ans << "\n";
    	}
    }

    return 0;
}


#include <bits/stdc++.h>

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>
using namespace __gnu_pbds;

using namespace std;

#if !ONLINE_JUDGE
#define debug
#endif

typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> ii;
typedef vector<pair<int,int> > vii;
typedef pair<ll,ll> pll;
typedef vector<vector<int> > vvi;
typedef vector<vector<ii> > vvii;

#define pb push_back
#define mp make_pair
#define all(x) x.begin(),x.end()
#define sz(x) (int)x.size()
#define fill(a,x) memset(a,x,sizeof(a))
#define ff first
#define ss second
#define trav(a, x) for(auto& a : x)
#define FOR(i,a,b) for(int i = a; i<=b; ++i)
#define NFOR(i,a,b) for(int i = a; i>=b; --i)
const ll INF = 1e18;
const int mod = 1e9 + 7;

ll gcd(ll a,ll b){if (a==0) return b;return gcd(b%a,a);}
ll lcm(ll a,ll b){return a*(b/gcd(a,b));}
ll Abs(ll a){if(a>0)return a;return -a;}
ll Ceil(ll a,ll b){if(a%b==0)return a/b;else return a/b+1;}
double Abs(double a){if(a>0)return a;return -a;}

//*X.find_by_order(2) element at index=2
//X.order_of_key(1) how many elements strictly less than 1

#define ordered_set tree<int, null_type,less_equal<int>, rb_tree_tag,tree_order_statistics_node_update>

inline int pow_(ll x, ll y,ll p){
  int r = 1; while(y){if(y & 1) r = r * x % p; y >>= 1; x = x * x % p;} return r;
}
inline int inv_(int x){return pow_(x, mod - 2, mod);}
inline int add(ll a,ll b){a += b; if(a >= mod) a -= mod; return a;}
inline int mul(int a, int b){return a * 1LL * b % mod;}
inline int sub(int a, int b){a -= b; if(a < 0) a += mod; return a;}

#ifdef debug
#define dbg(...) { cerr<<"[ "; dump(#__VA_ARGS__, __VA_ARGS__);}
#undef endl
template <typename Arg1,typename Arg2>
ostream& operator << (ostream& out, const pair<Arg1,Arg2> &x) {
    return out<<"("<<x.ff<<","<<x.ss<<")";
}

template <typename Arg1>
ostream& operator << (ostream& out, const vector<Arg1> &a) {
    out<<"[";for(const auto &x:a)out<<x<<",";return out<<"]";
}

template <typename Arg1>
ostream& operator << (ostream& out, const set<Arg1> &a) {
    out<<"[";for(const auto &x:a)out<<x<<",";return out<<"]";
}

template <typename Arg1,typename Arg2>
ostream& operator << (ostream& out, const map<Arg1,Arg2> &a) {
    out<<"[";for(const auto &x:a)out<<x<<",";return out<<"]";
}

template <typename Arg1,typename Arg2>
ostream& operator << (ostream& out, const unordered_map<Arg1,Arg2> &a) {
    out<<"[";for(const auto &x:a)out<<x<<",";return out<<"]";
}

template <typename Arg1>
void dump(const string name, Arg1&& arg1){
    cerr << name << " : " << arg1 << " ] " << endl;
}

template <typename Arg1, typename... Args>
void dump(const string names, Arg1&& arg1, Args&&... args){
    const string name = names.substr(0,names.find(','));
    cerr<<name<<" : "<<arg1<<" | ";
    dump(names.substr(1+(int)name.size()), args...);
}
#else
    #define dbg(args...)
#endif

mt19937_64 mrand(chrono::steady_clock::now().time_since_epoch().count());

const int N = 2e5+5;

int n,t1[4*N];
int lazy1[4*N] = {0};
int t2[4*N];
int lazy2[4*N] = {0};

vvi G(N);
int a[N] = {0};
int even[N] = {0};
int odd[N] = {0};
int euler1[N] = {0};
int euler2[N] = {0};
int k1 = 0;
int k2 = 0;
int pos[N][2] = {0};
int dist[N] = {0};
int left1[N] = {0};
int right1[N] = {0};

void push1(int node){
	t1[2*node] += lazy1[node];
	lazy1[2*node] += lazy1[node];
	t1[2*node+1] += lazy1[node];
	lazy1[2*node+1] += lazy1[node];
	lazy1[node] = 0;
}

void build1(int a[],int node,int tl,int tr){
	if(tl==tr){
		t1[node]=a[tl];
		return;
	}

	int mid = (tl+tr)/2;
	build1(a,2*node,tl,mid);
	build1(a,2*node+1,mid+1,tr);
	t1[node] = t1[2*node+1] + t1[2*node];
}

ll query1(int node,int tl,int tr,int l,int r){
	if(l>r){
		return 0;
	}

	if(l==tl && r==tr){
		return t1[node];
	}

	push1(node);
	int tm = (tl+tr)/2;
	return query1(2*node,tl,tm,l,min(r,tm)) + query1(2*node+1,tm+1,tr,max(tm+1,l),r);
}

void update1(int node,int tl,int tr,int l,int r,int val){
	if(l>r){
		return;
	}

	if(l==tl && r==tr){
		t1[node] += val;
		lazy1[node] += val;
		return;
	}

	push1(node);
	int tm = (tl+tr)/2;
	update1(2*node,tl,tm,l,min(r,tm),val);
	update1(2*node+1,tm+1,tr,max(tm+1,l),r,val);
	t1[node] = t1[2*node] + t1[2*node+1];
}

void push2(int node){
	t2[2*node] += lazy2[node];
	lazy2[2*node] += lazy2[node];
	t2[2*node+1] += lazy2[node];
	lazy2[2*node+1] += lazy2[node];
	lazy2[node] = 0;
}

void build2(int a[],int node,int tl,int tr){
	if(tl==tr){
		t2[node]=a[tl];
		return;
	}

	int mid = (tl+tr)/2;
	build2(a,2*node,tl,mid);
	build2(a,2*node+1,mid+1,tr);
	t2[node] = t2[2*node+1] + t2[2*node];
}

ll query2(int node,int tl,int tr,int l,int r){
	if(l>r){
		return 0;
	}

	if(l==tl && r==tr){
		return t2[node];
	}

	push2(node);
	int tm = (tl+tr)/2;
	return query2(2*node,tl,tm,l,min(r,tm)) + query2(2*node+1,tm+1,tr,max(tm+1,l),r);
}

void update2(int node,int tl,int tr,int l,int r,int val){
	if(l>r){
		return;
	}

	if(l==tl && r==tr){
		t2[node] += val;
		lazy2[node] += val;
		return;
	}

	push2(node);
	int tm = (tl+tr)/2;
	update2(2*node,tl,tm,l,min(r,tm),val);
	update2(2*node+1,tm+1,tr,max(tm+1,l),r,val);
	t2[node] = t2[2*node] + t2[2*node+1];
}

void dfs(int u,int p, int d){

	dist[u] = d;

	if(d%2){
		euler1[++k1] = a[u];
		pos[u][0] = k1;
	} else {
		euler2[++k2] = a[u];
		pos[u][0] = k2;
	}

	for(auto v:G[u]){
		if(v!=p){
			if(left1[u] == 0)left1[u] = v;
			right1[u] = v;
			dfs(v,u,d+1);
		}
	}

	if(d%2){
		euler1[++k1] = a[u];
		pos[u][1] = k1;
	} else {
		euler2[++k2] = a[u];
		pos[u][1] = k2;
	}
}

int main(int argc, char const *argv[])
{
    #ifdef LOCAL_TEST
    freopen("in.txt","r",stdin);
    //freopen("out.txt", "w", stdout);
    #else
    ios_base::sync_with_stdio(false);cin.tie(NULL);
    #endif
    int n,m;
    cin>>n>>m;

    for(int i=1;i<=n;i++){
    	cin>>a[i];
    }

    for(int i=1;i<=n-1;i++){
    	int u,v;
    	cin>>u>>v;
    	G[u].pb(v);
    	G[v].pb(u);
    }

    dfs(1,-1,0);

    int n1 = k1;
    int n2 = k2;

    build1(euler1,1,1,n1);
    build2(euler2,1,1,n2);

    while(m--){
    	int x;
    	cin>>x;
    	if(x == 1){
    		int y,val;
    		cin>>y>>val;
    		int l = pos[y][0];
    		int r = pos[y][1];
    		int l1 = 1;
    		int r1 = 0;
    		if(G[y].size()){
				int v = left1[y];
				int w = right1[y];
				//dbg(v,w);
				l1 = pos[v][0];
				r1 = pos[w][1];
    		}
    		//dbg(l,r,l1,r1);
    		int d = dist[y];
    		if(d%2){
    			update1(1,1,n1,l,r,val);
    			update2(1,1,n2,l1,r1,-val);
    		} else {
    			update2(1,1,n2,l,r,val);
    			update1(1,1,n1,l1,r1,-val);
    		}
    	} else {
    		int u;
    		cin>>u;
    		int d = dist[u];
    		int l = pos[u][0];
    		int ans;
    		if(d%2){
    			ans = query1(1,1,n1,l,l);
    		} else {
    			ans = query2(1,1,n2,l,l);
    		}
    		cout << ans << "\n";
    	}
    }

    return 0;
}


#include <bits/stdc++.h>

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>
using namespace __gnu_pbds;

using namespace std;

#if !ONLINE_JUDGE
#define debug
#endif

typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> ii;
typedef vector<pair<int,int> > vii;
typedef pair<ll,ll> pll;
typedef vector<vector<int> > vvi;
typedef vector<vector<ii> > vvii;

#define pb push_back
#define mp make_pair
#define all(x) x.begin(),x.end()
#define sz(x) (int)x.size()
#define fill(a,x) memset(a,x,sizeof(a))
#define ff first
#define ss second
#define trav(a, x) for(auto& a : x)
#define FOR(i,a,b) for(int i = a; i<=b; ++i)
#define NFOR(i,a,b) for(int i = a; i>=b; --i)
const ll INF = 1e18;
const int mod = 1e9 + 7;

ll gcd(ll a,ll b){if (a==0) return b;return gcd(b%a,a);}
ll lcm(ll a,ll b){return a*(b/gcd(a,b));}
ll Abs(ll a){if(a>0)return a;return -a;}
ll Ceil(ll a,ll b){if(a%b==0)return a/b;else return a/b+1;}
double Abs(double a){if(a>0)return a;return -a;}

//*X.find_by_order(2) element at index=2
//X.order_of_key(1) how many elements strictly less than 1

#define ordered_set tree<int, null_type,less_equal<int>, rb_tree_tag,tree_order_statistics_node_update>

inline int pow_(ll x, ll y,ll p){
  int r = 1; while(y){if(y & 1) r = r * x % p; y >>= 1; x = x * x % p;} return r;
}
inline int inv_(int x){return pow_(x, mod - 2, mod);}
inline int add(ll a,ll b){a += b; if(a >= mod) a -= mod; return a;}
inline int mul(int a, int b){return a * 1LL * b % mod;}
inline int sub(int a, int b){a -= b; if(a < 0) a += mod; return a;}

#ifdef debug
#define dbg(...) { cerr<<"[ "; dump(#__VA_ARGS__, __VA_ARGS__);}
#undef endl
template <typename Arg1,typename Arg2>
ostream& operator << (ostream& out, const pair<Arg1,Arg2> &x) {
    return out<<"("<<x.ff<<","<<x.ss<<")";
}

template <typename Arg1>
ostream& operator << (ostream& out, const vector<Arg1> &a) {
    out<<"[";for(const auto &x:a)out<<x<<",";return out<<"]";
}

template <typename Arg1>
ostream& operator << (ostream& out, const set<Arg1> &a) {
    out<<"[";for(const auto &x:a)out<<x<<",";return out<<"]";
}

template <typename Arg1,typename Arg2>
ostream& operator << (ostream& out, const map<Arg1,Arg2> &a) {
    out<<"[";for(const auto &x:a)out<<x<<",";return out<<"]";
}

template <typename Arg1,typename Arg2>
ostream& operator << (ostream& out, const unordered_map<Arg1,Arg2> &a) {
    out<<"[";for(const auto &x:a)out<<x<<",";return out<<"]";
}

template <typename Arg1>
void dump(const string name, Arg1&& arg1){
    cerr << name << " : " << arg1 << " ] " << endl;
}

template <typename Arg1, typename... Args>
void dump(const string names, Arg1&& arg1, Args&&... args){
    const string name = names.substr(0,names.find(','));
    cerr<<name<<" : "<<arg1<<" | ";
    dump(names.substr(1+(int)name.size()), args...);
}
#else
    #define dbg(args...)
#endif

mt19937_64 mrand(chrono::steady_clock::now().time_since_epoch().count());

const int N = 2e5+5;

int n,t1[4*N];
int lazy1[4*N] = {0};
int t2[4*N];
int lazy2[4*N] = {0};

vvi G(N);
int a[N] = {0};
int even[N] = {0};
int odd[N] = {0};
int euler1[N] = {0};
int euler2[N] = {0};
int k1 = 0;
int k2 = 0;
int pos[N][2] = {0};
int dist[N] = {0};
int left1[N] = {0};
int right1[N] = {0};

void push1(int node){
	t1[2*node] += lazy1[node];
	lazy1[2*node] += lazy1[node];
	t1[2*node+1] += lazy1[node];
	lazy1[2*node+1] += lazy1[node];
	lazy1[node] = 0;
}

void build1(int a[],int node,int tl,int tr){
	if(tl > tr){
		return;
	}

	if(tl==tr){
		t1[node]=a[tl];
		return;
	}

	int mid = (tl+tr)/2;
	build1(a,2*node,tl,mid);
	build1(a,2*node+1,mid+1,tr);
	t1[node] = t1[2*node+1] + t1[2*node];
}

ll query1(int node,int tl,int tr,int l,int r){
	if(l>r){
		return 0;
	}

	if(l==tl && r==tr){
		return t1[node];
	}

	push1(node);
	int tm = (tl+tr)/2;
	return query1(2*node,tl,tm,l,min(r,tm)) + query1(2*node+1,tm+1,tr,max(tm+1,l),r);
}

void update1(int node,int tl,int tr,int l,int r,int val){
	if(l>r){
		return;
	}

	if(l==tl && r==tr){
		t1[node] += val;
		lazy1[node] += val;
		return;
	}

	push1(node);
	int tm = (tl+tr)/2;
	update1(2*node,tl,tm,l,min(r,tm),val);
	update1(2*node+1,tm+1,tr,max(tm+1,l),r,val);
	t1[node] = t1[2*node] + t1[2*node+1];
}

void push2(int node){
	t2[2*node] += lazy2[node];
	lazy2[2*node] += lazy2[node];
	t2[2*node+1] += lazy2[node];
	lazy2[2*node+1] += lazy2[node];
	lazy2[node] = 0;
}

void build2(int a[],int node,int tl,int tr){
	if(tl > tr){
		return;
	}

	if(tl==tr){
		t2[node]=a[tl];
		return;
	}

	int mid = (tl+tr)/2;
	build2(a,2*node,tl,mid);
	build2(a,2*node+1,mid+1,tr);
	t2[node] = t2[2*node+1] + t2[2*node];
}

ll query2(int node,int tl,int tr,int l,int r){
	if(l>r){
		return 0;
	}

	if(l==tl && r==tr){
		return t2[node];
	}

	push2(node);
	int tm = (tl+tr)/2;
	return query2(2*node,tl,tm,l,min(r,tm)) + query2(2*node+1,tm+1,tr,max(tm+1,l),r);
}

void update2(int node,int tl,int tr,int l,int r,int val){
	if(l>r){
		return;
	}

	if(l==tl && r==tr){
		t2[node] += val;
		lazy2[node] += val;
		return;
	}

	push2(node);
	int tm = (tl+tr)/2;
	update2(2*node,tl,tm,l,min(r,tm),val);
	update2(2*node+1,tm+1,tr,max(tm+1,l),r,val);
	t2[node] = t2[2*node] + t2[2*node+1];
}

void dfs(int u,int p, int d){

	dist[u] = d;

	if(d%2){
		euler1[++k1] = a[u];
		pos[u][0] = k1;
	} else {
		euler2[++k2] = a[u];
		pos[u][0] = k2;
	}

	for(auto v:G[u]){
		if(v!=p){
			if(left1[u] == 0)left1[u] = v;
			right1[u] = v;
			dfs(v,u,d+1);
		}
	}

	if(d%2){
		euler1[++k1] = a[u];
		pos[u][1] = k1;
	} else {
		euler2[++k2] = a[u];
		pos[u][1] = k2;
	}
}

int main(int argc, char const *argv[])
{
    #ifdef LOCAL_TEST
    freopen("in.txt","r",stdin);
    //freopen("out.txt", "w", stdout);
    #else
    ios_base::sync_with_stdio(false);cin.tie(NULL);
    #endif
    int n,m;
    cin>>n>>m;

    for(int i=1;i<=n;i++){
    	cin>>a[i];
    }

    for(int i=1;i<=n-1;i++){
    	int u,v;
    	cin>>u>>v;
    	G[u].pb(v);
    	G[v].pb(u);
    }

    dfs(1,-1,0);

    int n1 = k1;
    int n2 = k2;

    build1(euler1,1,1,n1);
    build2(euler2,1,1,n2);

    while(m--){
    	int x;
    	cin>>x;
    	if(x == 1){
    		int y,val;
    		cin>>y>>val;
    		int l = pos[y][0];
    		int r = pos[y][1];
    		int l1 = 1;
    		int r1 = 0;
    		if(G[y].size()){
				int v = left1[y];
				int w = right1[y];
				l1 = pos[v][0];
				r1 = pos[w][1];
    		}
    		int d = dist[y];
    		if(d%2){
    			update1(1,1,n1,l,r,val);
    			update2(1,1,n2,l1,r1,-val);
    		} else {
    			update2(1,1,n2,l,r,val);
    			update1(1,1,n1,l1,r1,-val);
    		}
    	} else {
    		int u;
    		cin>>u;
    		int d = dist[u];
    		int l = pos[u][0];
    		int ans;
    		if(d%2){
    			ans = query1(1,1,n1,l,l);
    		} else {
    			ans = query2(1,1,n2,l,l);
    		}
    		cout << ans << "\n";
    	}
    }

    return 0;
}


#include <bits/stdc++.h>

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>
using namespace __gnu_pbds;

using namespace std;

#if !ONLINE_JUDGE
#define debug
#endif

typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> ii;
typedef vector<pair<int,int> > vii;
typedef pair<ll,ll> pll;
typedef vector<vector<int> > vvi;
typedef vector<vector<ii> > vvii;

#define pb push_back
#define mp make_pair
#define all(x) x.begin(),x.end()
#define sz(x) (int)x.size()
#define fill(a,x) memset(a,x,sizeof(a))
#define ff first
#define ss second
#define trav(a, x) for(auto& a : x)
#define FOR(i,a,b) for(int i = a; i<=b; ++i)
#define NFOR(i,a,b) for(int i = a; i>=b; --i)
const ll INF = 1e18;
const int mod = 1e9 + 7;

ll gcd(ll a,ll b){if (a==0) return b;return gcd(b%a,a);}
ll lcm(ll a,ll b){return a*(b/gcd(a,b));}
ll Abs(ll a){if(a>0)return a;return -a;}
ll Ceil(ll a,ll b){if(a%b==0)return a/b;else return a/b+1;}
double Abs(double a){if(a>0)return a;return -a;}

//*X.find_by_order(2) element at index=2
//X.order_of_key(1) how many elements strictly less than 1

#define ordered_set tree<int, null_type,less_equal<int>, rb_tree_tag,tree_order_statistics_node_update>

inline int pow_(ll x, ll y,ll p){
  int r = 1; while(y){if(y & 1) r = r * x % p; y >>= 1; x = x * x % p;} return r;
}
inline int inv_(int x){return pow_(x, mod - 2, mod);}
inline int add(ll a,ll b){a += b; if(a >= mod) a -= mod; return a;}
inline int mul(int a, int b){return a * 1LL * b % mod;}
inline int sub(int a, int b){a -= b; if(a < 0) a += mod; return a;}

#ifdef debug
#define dbg(...) { cerr<<"[ "; dump(#__VA_ARGS__, __VA_ARGS__);}
#undef endl
template <typename Arg1,typename Arg2>
ostream& operator << (ostream& out, const pair<Arg1,Arg2> &x) {
    return out<<"("<<x.ff<<","<<x.ss<<")";
}

template <typename Arg1>
ostream& operator << (ostream& out, const vector<Arg1> &a) {
    out<<"[";for(const auto &x:a)out<<x<<",";return out<<"]";
}

template <typename Arg1>
ostream& operator << (ostream& out, const set<Arg1> &a) {
    out<<"[";for(const auto &x:a)out<<x<<",";return out<<"]";
}

template <typename Arg1,typename Arg2>
ostream& operator << (ostream& out, const map<Arg1,Arg2> &a) {
    out<<"[";for(const auto &x:a)out<<x<<",";return out<<"]";
}

template <typename Arg1,typename Arg2>
ostream& operator << (ostream& out, const unordered_map<Arg1,Arg2> &a) {
    out<<"[";for(const auto &x:a)out<<x<<",";return out<<"]";
}

template <typename Arg1>
void dump(const string name, Arg1&& arg1){
    cerr << name << " : " << arg1 << " ] " << endl;
}

template <typename Arg1, typename... Args>
void dump(const string names, Arg1&& arg1, Args&&... args){
    const string name = names.substr(0,names.find(','));
    cerr<<name<<" : "<<arg1<<" | ";
    dump(names.substr(1+(int)name.size()), args...);
}
#else
    #define dbg(args...)
#endif

mt19937_64 mrand(chrono::steady_clock::now().time_since_epoch().count());

const int N = 2e5+5;

int n,t1[4*N];
int lazy1[4*N] = {0};
int t2[4*N];
int lazy2[4*N] = {0};

vvi G(N);
int a[N] = {0};
int even[N] = {0};
int odd[N] = {0};
int euler1[N] = {0};
int euler2[N] = {0};
int k1 = 0;
int k2 = 0;
int pos[N][2] = {0};
int dist[N] = {0};
int left1[N] = {0};
int right1[N] = {0};

void push1(int node){
    t1[2*node] += lazy1[node];
    lazy1[2*node] += lazy1[node];
    t1[2*node+1] += lazy1[node];
    lazy1[2*node+1] += lazy1[node];
    lazy1[node] = 0;
}

void build1(int a[],int node,int tl,int tr){
    if(tl > tr){
        return;
    }

    if(tl==tr){
        t1[node]=a[tl];
        return;
    }

    int mid = (tl+tr)/2;
    build1(a,2*node,tl,mid);
    build1(a,2*node+1,mid+1,tr);
    t1[node] = t1[2*node+1] + t1[2*node];
}

ll query1(int node,int tl,int tr,int l,int r){
    if(l>r){
        return 0;
    }

    if(l==tl && r==tr){
        return t1[node];
    }

    push1(node);
    int tm = (tl+tr)/2;
    return query1(2*node,tl,tm,l,min(r,tm)) + query1(2*node+1,tm+1,tr,max(tm+1,l),r);
}

void update1(int node,int tl,int tr,int l,int r,int val){
    if(l>r){
        return;
    }

    if(l==tl && r==tr){
        t1[node] += val;
        lazy1[node] += val;
        return;
    }

    push1(node);
    int tm = (tl+tr)/2;
    update1(2*node,tl,tm,l,min(r,tm),val);
    update1(2*node+1,tm+1,tr,max(tm+1,l),r,val);
    t1[node] = t1[2*node] + t1[2*node+1];
}

void push2(int node){
    t2[2*node] += lazy2[node];
    lazy2[2*node] += lazy2[node];
    t2[2*node+1] += lazy2[node];
    lazy2[2*node+1] += lazy2[node];
    lazy2[node] = 0;
}

void build2(int a[],int node,int tl,int tr){
    if(tl > tr){
        return;
    }

    if(tl==tr){
        t2[node]=a[tl];
        return;
    }

    int mid = (tl+tr)/2;
    build2(a,2*node,tl,mid);
    build2(a,2*node+1,mid+1,tr);
    t2[node] = t2[2*node+1] + t2[2*node];
}

ll query2(int node,int tl,int tr,int l,int r){
    if(l>r){
        return 0;
    }

    if(l==tl && r==tr){
        return t2[node];
    }

    push2(node);
    int tm = (tl+tr)/2;
    return query2(2*node,tl,tm,l,min(r,tm)) + query2(2*node+1,tm+1,tr,max(tm+1,l),r);
}

void update2(int node,int tl,int tr,int l,int r,int val){
    if(l>r){
        return;
    }

    if(l==tl && r==tr){
        t2[node] += val;
        lazy2[node] += val;
        return;
    }

    push2(node);
    int tm = (tl+tr)/2;
    update2(2*node,tl,tm,l,min(r,tm),val);
    update2(2*node+1,tm+1,tr,max(tm+1,l),r,val);
    t2[node] = t2[2*node] + t2[2*node+1];
}

void dfs(int u,int p, int d){

    dist[u] = d;

    if(d%2){
        euler1[++k1] = a[u];
        pos[u][0] = k1;
    } else {
        euler2[++k2] = a[u];
        pos[u][0] = k2;
    }

    for(auto v:G[u]){
        if(v!=p){
            if(left1[u] == 0)left1[u] = v;
            right1[u] = v;
            dfs(v,u,d+1);
        }
    }

    if(d%2){
        euler1[++k1] = a[u];
        pos[u][1] = k1;
    } else {
        euler2[++k2] = a[u];
        pos[u][1] = k2;
    }
}

int main(int argc, char const *argv[])
{
    #ifdef LOCAL_TEST
    freopen("in.txt","r",stdin);
    //freopen("out.txt", "w", stdout);
    #else
    ios_base::sync_with_stdio(false);cin.tie(NULL);
    #endif
    int n,m;
    cin>>n>>m;

    for(int i=1;i<=n;i++){
        cin>>a[i];
    }

    for(int i=1;i<=n-1;i++){
        int u,v;
        cin>>u>>v;
        G[u].pb(v);
        G[v].pb(u);
    }

    dfs(1,-1,0);

    int n1 = k1;
    int n2 = k2;

    build1(euler1,1,1,n1);
    build2(euler2,1,1,n2);

    while(m--){
        int x;
        cin>>x;
        if(x == 1){
            int y,val;
            cin>>y>>val;
            int l = pos[y][0];
            int r = pos[y][1];
            int l1 = 1;
            int r1 = 0;
            if(G[y].size() > 1 || y == 1){
                int v = left1[y];
                int w = right1[y];
                l1 = pos[v][0];
                r1 = pos[w][1];
            }
            int d = dist[y];
            if(d%2){
                update1(1,1,n1,l,r,val);
                update2(1,1,n2,l1,r1,-val);
            } else {
                update2(1,1,n2,l,r,val);
                update1(1,1,n1,l1,r1,-val);
            }
        } else {
            int u;
            cin>>u;
            int d = dist[u];
            int l = pos[u][0];
            int ans = 0;
            if(d%2){
                ans = query1(1,1,n1,l,l);
            } else {
                ans = query2(1,1,n2,l,l);
            }
            cout << ans << "\n";
        }
    }

    return 0;
}


#include <bits/stdc++.h>

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>
using namespace __gnu_pbds;

using namespace std;

#if !ONLINE_JUDGE
#define debug
#endif

typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> ii;
typedef vector<pair<int,int> > vii;
typedef pair<ll,ll> pll;
typedef vector<vector<int> > vvi;
typedef vector<vector<ii> > vvii;

#define pb push_back
#define mp make_pair
#define all(x) x.begin(),x.end()
#define sz(x) (int)x.size()
#define fill(a,x) memset(a,x,sizeof(a))
#define ff first
#define ss second
#define trav(a, x) for(auto& a : x)
#define FOR(i,a,b) for(int i = a; i<=b; ++i)
#define NFOR(i,a,b) for(int i = a; i>=b; --i)
const ll INF = 1e18;
const int mod = 1e9 + 7;

ll gcd(ll a,ll b){if (a==0) return b;return gcd(b%a,a);}
ll lcm(ll a,ll b){return a*(b/gcd(a,b));}
ll Abs(ll a){if(a>0)return a;return -a;}
ll Ceil(ll a,ll b){if(a%b==0)return a/b;else return a/b+1;}
double Abs(double a){if(a>0)return a;return -a;}

//*X.find_by_order(2) element at index=2
//X.order_of_key(1) how many elements strictly less than 1

#define ordered_set tree<int, null_type,less_equal<int>, rb_tree_tag,tree_order_statistics_node_update>

inline int pow_(ll x, ll y,ll p){
  int r = 1; while(y){if(y & 1) r = r * x % p; y >>= 1; x = x * x % p;} return r;
}
inline int inv_(int x){return pow_(x, mod - 2, mod);}
inline int add(ll a,ll b){a += b; if(a >= mod) a -= mod; return a;}
inline int mul(int a, int b){return a * 1LL * b % mod;}
inline int sub(int a, int b){a -= b; if(a < 0) a += mod; return a;}

#ifdef debug
#define dbg(...) { cerr<<"[ "; dump(#__VA_ARGS__, __VA_ARGS__);}
#undef endl
template <typename Arg1,typename Arg2>
ostream& operator << (ostream& out, const pair<Arg1,Arg2> &x) {
    return out<<"("<<x.ff<<","<<x.ss<<")";
}

template <typename Arg1>
ostream& operator << (ostream& out, const vector<Arg1> &a) {
    out<<"[";for(const auto &x:a)out<<x<<",";return out<<"]";
}

template <typename Arg1>
ostream& operator << (ostream& out, const set<Arg1> &a) {
    out<<"[";for(const auto &x:a)out<<x<<",";return out<<"]";
}

template <typename Arg1,typename Arg2>
ostream& operator << (ostream& out, const map<Arg1,Arg2> &a) {
    out<<"[";for(const auto &x:a)out<<x<<",";return out<<"]";
}

template <typename Arg1,typename Arg2>
ostream& operator << (ostream& out, const unordered_map<Arg1,Arg2> &a) {
    out<<"[";for(const auto &x:a)out<<x<<",";return out<<"]";
}

template <typename Arg1>
void dump(const string name, Arg1&& arg1){
    cerr << name << " : " << arg1 << " ] " << endl;
}

template <typename Arg1, typename... Args>
void dump(const string names, Arg1&& arg1, Args&&... args){
    const string name = names.substr(0,names.find(','));
    cerr<<name<<" : "<<arg1<<" | ";
    dump(names.substr(1+(int)name.size()), args...);
}
#else
    #define dbg(args...)
#endif

mt19937_64 mrand(chrono::steady_clock::now().time_since_epoch().count());

const int N = 2e5+5;

vvi G(N);
int a[N] = {0};
vector<int> euler1;
vector<int> euler2;
int pos[N][2] = {0};
int dist[N] = {0};
int left1[N] = {0};
int right1[N] = {0};
int k1 = 0;
int k2 = 0;

struct FenwickTree {
    vector<int> bit;  // binary indexed tree
    int n;

    FenwickTree(int n) { // initialize
        this->n = n;
        bit.assign(n, 0);
    }

    FenwickTree(vector<int> a) : FenwickTree(a.size()) { // building the tree
        for (size_t i = 0; i < a.size(); i++)
            range_add(i,i,a[i]);
    }

    int query(int r) { // query function  // returns sum from [0,r]
        int ret = 0;
        for (; r >= 0; r = (r & (r + 1)) - 1)
            ret += bit[r];
        return ret;
    }

    void range_add(int l,int r, int val){
    	add(l,val);
    	add(r+1,-val);
    }

    int f(int l, int r) {
        return query(r) - query(l - 1);
    }

    void add(int idx, int delta) { // update function // update a[idx] wih delta
        for (; idx < n; idx = idx | (idx + 1))
            bit[idx] += delta;
    }
};

void dfs(int u,int p, int d){

	dist[u] = d;

	if(d%2){
		euler1.pb(a[u]);
		pos[u][0] = k1;
		k1++;
	} else {
		euler2.pb(a[u]);
		pos[u][0] = k2;
		k2++;
	}

	for(auto v:G[u]){
		if(v!=p){
			if(left1[u] == 0)left1[u] = v;
			right1[u] = v;
			dfs(v,u,d+1);
		}
	}

	if(d%2){
		euler1.pb(a[u]);
		pos[u][1] = k1;
		k1++;
	} else {
		euler2.pb(a[u]);
		pos[u][1] = k2;
		k2++;
	}
}

int main(int argc, char const *argv[])
{
    #ifdef LOCAL_TEST
    freopen("in.txt","r",stdin);
    //freopen("out.txt", "w", stdout);
    #else
    ios_base::sync_with_stdio(false);cin.tie(NULL);
    #endif
    int n,m;
    cin>>n>>m;

    for(int i=1;i<=n;i++){
    	cin>>a[i];
    }

    for(int i=0;i<n-1;i++){
    	int u,v;
    	cin>>u>>v;
    	G[u].pb(v);
    	G[v].pb(u);
    }

    dfs(1,-1,0);

    int n1 = k1;
    int n2 = k2;

    struct FenwickTree t1 = FenwickTree(euler1);
    struct FenwickTree t2 = FenwickTree(euler2);

    while(m--){
    	int x;
    	cin>>x;
    	if(x == 1){
    		int y,val;
    		cin>>y>>val;
    		int l = pos[y][0];
    		int r = pos[y][1];
    		int l1 = 1;
    		int r1 = 0;
    		if(G[y].size() > 1 || (G[y].size() && y == 1)){
				int v = left1[y];
				int w = right1[y];
				l1 = pos[v][0];
				r1 = pos[w][1];
    		}
    		int d = dist[y];
    		//dbg(l,r,l1,r1);
    		if(d%2){
    			t1.range_add(l,r,val);
    			if(l1 <= r1)
    			t2.range_add(l1,r1,-val);
    		} else {
    			t2.range_add(l,r,val);
    			if(l1<=r1)
    			t1.range_add(l1,r1,-val);
    		}
    	} else {
    		int u;
    		cin>>u;
    		int d = dist[u];
    		int l = pos[u][0];
    		int ans = 0;
    		if(d%2){
    			ans = t1.query(l);
    		} else {
    			ans = t2.query(l);
    		}
    		cout << ans << "\n";
    	}
    }

    return 0;
}


#include<bits/stdc++.h>
using namespace std;
 typedef pair<int,int> pii;
 typedef pair<char,char> pcc;
 typedef long long ll;
 typedef unsigned long long ull;
 typedef pair<ll,ll> pll;
typedef vector<ll> vll;
typedef vector<pll> vpll;
typedef vector<ull> vull;
typedef vector<int> vi;
typedef vector<bool> vb;
typedef vector<char> vc;
typedef tuple<int,int,int> tiii;
#define rkmod 1125899906842597LL
#define mod1 1000000007LL
#define mod 1000000007LL
#define mod2 1000000007LL
#define mod3 1000000009LL
#define mx9 1000000000LL
#define mx10 10000000000LL
#define mx5 100000
#define mx8 100000000LL
#define mx7 10000000LL
#define mx6 1000000LL
#define mx6_5 5000000
#define last 4444444444
 #define f first
 #define s second
 #define rep(i,a,b) for(ll i=(a);i<=(b);i++)
#define reprev(i,a,b) for(ll i=(a);i>=(b);i--)
 #define repi(i,a,b) for(int i=(a);i<=(b);i++)
#define reprevi(i,a,b) for(int i=(a);i>=(b);i--)
#define mp make_pair
#define pb push_back
#define x first
#define y second
//#define PI 3.14159265
const long double PI = 2*acos(0.0);
const int stdLength = 25;
const ll max_number = 1048575;
typedef vector<bool> vb;
void print(vb &a)
{

    for(bool i:a)
    {
        cout<<i<<" ";
    }
    cout<<"\n";
}
void print(vi &a)
{

    for(int i:a)
    {
        cout<<i<<" ";
    }
    cout<<"\n";
}
void print(vc &a)
{

    for(char i:a)
    {
        cout<<i<<" ";
    }
    cout<<"\n";
}
void print(vll &a)
{

    for(ll i:a)
    {
        cout<<i<<" ";
    }
    cout<<"\n";
}
void print(vector<vi> &a)
{
    for(vi i:a)
    {
        print(i);
    }
    cout<<"\n";
}
void print(vector<vll> &a)
{
    for(vll i:a)
    {
        print(i);
    }
    cout<<"\n";
}
void print(vector<double> &a)
{

    for(double i:a)
    {
        cout<<i<<" ";
    }
    cout<<"\n";
}
void print(vector<long double> &a)
{

    for(long double i:a)
    {
        cout<<i<<" ";
    }
    cout<<"\n";
}
void print(vector<pll> &a)
{
    for(auto i:a)
    {
        cout<<"("<<i.f<<", "<<i.s<<") ";
    }
    cout<<"\n";
}
void print(vector<pii> &a)
{

    for(auto i:a)
    {
        cout<<"("<<i.f<<", "<<i.s<<") ";
    }
    cout<<"\n";
}
void print(pii &p)
{
    cout<<"("<<p.f<<", "<<p.s<<") ";

}
void print(deque<pll> &a)
{

    for(pll i:a)
    {
        cout<<i.f<<" "<<i.s<<"\n";
    }
    cout<<"\n";
}
ll dist_sq(pll a,pll b)
{
    return ((a.x-b.x)*(a.x-b.x)+ (a.y-b.y)*(a.y-b.y));
}

ll po(ll a,ll b)
{
    if(b<=0)
        return 1;
    else if(b==1)
        return a;

    ll vl = po((a*a),b/2);
    if(b%2==0)
        return vl;
    else
        return (vl)*a;
}

ll pomod(ll a,ll b)
{
    a= a%mod;
    if(b<=0)
        return 1%mod;
    else if(b==1)
        return a%mod;

    ll vl = pomod((a*a)%mod,b/2);
    vl = vl%mod;
    if(b%2==0)
        return vl;
    else
        return ((vl)*a)%mod;
}

ll pomod(ll a,ll b,ll mo)
{
    a= a%mo;
    if(b<=0)
        return 1%mo;
    else if(b==1)
        return a%mo;

    ll vl = pomod((a*a)%mo,b/2);
    vl = vl%mo;
    if(b%2==0)
        return vl;
    else
        return ((vl)*a)%mo;
}
ll factmod(ll n, ll mo)
{
    ll val=n;
    ll ans =1;
    while(val>=1)
    {
        ans = (ans*val)%mo;
        val--;
    }

    return ans;
}
ll inv(ll a,ll mo)
{
    return pomod(a,mo-2,mo);
}

ll combinationMod(ll n, ll i)
{
    ll ans = 1;
    ans = (ans * factmod(n,mod))%mod;
    ll invVal =  (inv(factmod(i,mod),mod)%mod * inv(factmod(n-i,mod),mod)%mod)%mod;
    ans = (ans * invVal)%mod;
    return ans;
}
ll greatestCommonDivisor(ll a, ll b){
    if(b>a){
        return greatestCommonDivisor(b,a);
    }
    if(b==0){
        return a;
    }

    if(a%b==0){
        return b;
    } else{
        return greatestCommonDivisor(b,a%b);
    }
}
ll greatestCommonDivisor( const vll &numList, int st, int en){
    assert(st>=0 and st<(int)numList.size());
    assert(en>=0 and en<(int)numList.size());
    if(st>en){
        return 0;
    } else if(st==en){
        return numList[st];
    } else if(en==st+1){
        return greatestCommonDivisor(numList[st],numList[st+1]);
    } else{
        return greatestCommonDivisor(numList[st],greatestCommonDivisor(numList,st+1,en));
    }
}
ll greatestCommonDivisor( const vll &numList){
    if(numList.size()==0){
        return 0;
    }
    int st = 0;
    int en = numList.size();
    en--;
    return greatestCommonDivisor(numList,st,en);
}
vector<vll> preComputeCombinationMod(int n)
{
    vector<vll> comb(n+1,vll(n+1,0));
    comb[0][0]=1;
    rep(i,1,n)
    {
        comb[i][0] = 1;
        comb[0][i] = 0;
    }

    rep(i,1,n)
    {
        rep(j,1,i)
        {
            comb[i][j] = (comb[i-1][j-1]%mod + comb[i-1][j]%mod)%mod;
        }
    }

    return comb;
}
ll floorlog2(ll n)
{
    ll h = 0;
    ll p = 1;
    while(p<=n)
    {
        h++;
        p*=2;
    }

    return h-1;
}
ll floorlog2(ll n,ll b)
{
    ll h = 0;
    ll p = 1;
    while(p<=n)
    {
        h++;
        p*=b;
    }

    return h-1;
}

class Trie {
    private:
    vector<Trie*> children;
    bool this_inserted = false;
public:
    /** Initialize your data structure here. */
    Trie() {
        children.resize(26,NULL);
        this_inserted = false;
    }
    /** Inserts a word into the trie. */
    void insert(string word) {
        Trie * cur = this;

        for(char c: word)
        {
            int ind = c-'a';
            if(cur->children[ind]==NULL)
            {
                cur->children[ind] = new Trie();

            }
            cur = cur->children[ind];
        }

        cur->this_inserted = true;
    }

    /** Returns if the word is in the trie. */
    bool search(string word) {
        Trie * cur = this;

        for(char c: word)
        {
            int ind = c-'a';
            if(cur->children[ind]==NULL)
            {
                return false;
            }
                cur = cur->children[ind];
        }

        return cur->this_inserted;

    }

    /** Returns if there is any word in the trie that starts with the given prefix. */
    bool startsWith(string prefix) {
        string word = prefix ;

      Trie * cur = this;

        for(char c: word)
        {
            int ind = c-'a';
            if(cur->children[ind]==NULL)
            {
                return false;
            }
                cur = cur->children[ind];
        }

        return true;
    }
};

class FenwickTree
{
    public:
    vll BIT;

    FenwickTree(int n=mx5)
    {
        BIT.resize(n+1,0);
    }
    FenwickTree(vll a)
    {
        int n = a.size();

        BIT.resize(n+1,0);

        rep(i,0,n-1)
        {
            update(i+1,a[i]);
        }
    }
    FenwickTree(vi a)
    {
        vll b(a.begin(),a.end());

        int n = b.size();

        BIT.resize(n+1,0);

        rep(i,0,n-1)
        {
            update(i+1,b[i]);
        }
    }

    void update(int ind, ll val)
    {
        assert(0<=ind and ind<BIT.size());

        int x = ind;
        int sz = BIT.size();

        while(x<sz)
        {
            BIT[x]+=val;
            x += (x&-x);
        }
    }

    void set(int ind, ll val)
    {
        assert(0<=ind and ind<BIT.size());

        ll currentVal = query(ind,ind);
        update(ind,val-currentVal);
    }
    ll query(int l, int r)
    {
        assert(0<=l and r<BIT.size());

        if(r<l)
        {
            return 0;
        }
        else
            return prefQuery(r) - prefQuery(l-1);
    }
    ll prefQuery(int ind)
    {
        assert(0<=ind and ind<BIT.size());
        int x = ind;
        ll sum = 0;
        while(x>0)
        {
            sum+=BIT[x];
            x-=(x&-x);
        }

        return sum;
    }
};

class FenwickTreeRangeUpdate
{
    public:
    FenwickTree bitTree;

    FenwickTreeRangeUpdate(int n)
    {
        bitTree = FenwickTree(n+1);
    }

    void updateRange(pii indexRange, ll val)
    {
        bitTree.update(indexRange.f, val);
        bitTree.update(indexRange.s + 1,-val);
    }

    ll query(int ind)
    {
        return bitTree.prefQuery(ind);
    }
};

vll getPrimes(ll highestNum){

    vb isPrime(highestNum+5,true);
    vll primes;
    rep(i,2,highestNum){
        if(isPrime[i])
        {   primes.push_back(i);
            ll j = i;
            while(j*i<=highestNum){
                isPrime[j*i]=false;
                j++;
            }
        }
    }
    return primes;
}
ll getMultiplicity(ll num, ll prime){
    ll mult = 0;
    while(num%prime==0){
        mult+=1;
        num/=prime;
    }
    return mult;
}
vll getPrimeFactorization(ll num, vll &primes){
    int sz = primes.size();
    vll multcities(sz,0);

    rep(i,0,sz-1)
    {
        ll prime = primes[i];
        if(prime>num)
           return multcities;
        else
        {
            multcities[i] = getMultiplicity(num,prime);
            ll di = po(prime,multcities[i]);
            num = num/di;
        }
    }
    return multcities;
}

map<ll,ll> getMapPrimeFactorization(ll num, vll &primes){
    int sz = primes.size();
    map<ll,ll> primeFac;
    rep(i,0,sz-1)
    {
        ll prime = primes[i];
        if(prime>num)
           return primeFac;
        else
        {
            primeFac[prime] = getMultiplicity(num,prime);
            ll di = po(prime,primeFac[prime]);
            num = num/di;
        }
    }
    return primeFac;
}
vpll getListPrimeFactorization(ll num, vll &primes){
    int sz = primes.size();
    vpll primeFac;

    rep(i,0,sz-1)
    {
        ll prime = primes[i];
        if(prime>num)
           return primeFac;
        else
        {
            ll mult = getMultiplicity(num,prime);
            ll di = po(prime,mult);
            num = num/di;

            if(mult>0){
                primeFac.push_back(make_pair(prime,mult));
            }
        }
    }
    return primeFac;
}
vi compute_z(string s)
{
    int n = s.length();
    vi z(n,0);
    int l=0,r=0;
    z[0]=n;
    rep(i,1,n-1)
    {
        if(r<i)
        {
            l=r=i;
            int j = 0;
            if(s[0]!=s[i])
            {
                continue;
            }

            while(j<n and s[j] == s[i+j])
            {
                j++;
            }
            r = i+j-1;
            z[i] = r-i+1;
        }
        else
        {
            int beta = r-i+1;
            int k = i-l;

            if(z[k]<beta)
            {

                z[i]=z[k];

            }
            else
            {
                int j = 0;
                l = i;
                while(r<n and s[r]==s[r-l])
                {
                    r+=1;
                }
                r-=1;

                z[i] = r-i+1;

            }
        }
    }

    return z;
}

vi getOccurences(string s, string t){

     string comb = t + "$" + s;

     auto z_vals = compute_z(comb);

     int n = s.size();
     int t_sz = t.size();

     vi occ;

     rep(i,0,n-1)
     {
         if(z_vals[t_sz + 1 +  i]==t_sz){
             occ.push_back(i);
         }
     }
     return occ;
}

class DSU{
    private:
    vi parent;
    vi size;
    public:
    DSU(int n){
        parent.resize(n+5,0);
        size.resize(n+5,0);
        rep(i,1,n){
            parent[i]=i;
            size[i] = 1;
        }
    }
    vi getParents(){
        return parent;
    }
     vi getSizes(){
        return size;
    }
    int getRoot(int node){
       int par = parent[node];
       if(parent[par] == par){
           return par;
       }

       int root = getRoot(par);

       parent[node] = root;

       return root;
    }

    bool checkSame(int a, int b){
        return getRoot(a)==getRoot(b);
    }

    void connectNodes(int a, int b){
        int root1 = getRoot(a);
        int root2 = getRoot(b);

        if(size[root1] < size[root2]){
            swap(root1,root2);
        }

        parent[root2] = root1;
        size[root1] += size[root2];
    }
};

class SegmentTreeNode{
    private:

    ll total;
    ll pendingUpdate;

    public:
    int start,end;

    SegmentTreeNode(): total(0), start(-1),end(-1),pendingUpdate(0){}

    void assignLeaf(ll value, int start, int end){
        total = value;
        this->start = start;
        this->end = end;
    }
    void merge(SegmentTreeNode &left, SegmentTreeNode&right){
        this->start = left.start;
        this->end = right.end;
        ll leftTotal = left.getValue();
        ll rightTotal = right.getValue();

        if(left.ifPendingUpdate()){
            leftTotal += left.getSegmentSize() * left.getPendingUpdate();
        }

        if(right.ifPendingUpdate()){
            rightTotal += right.getSegmentSize() * right.getPendingUpdate();
        }
        this->total = leftTotal + rightTotal;

    }
    ll getValue(){
        return total;
    }

    ll getPendingUpdate(){
        return pendingUpdate;
    }
    bool ifPendingUpdate(){
        return pendingUpdate!=0;
    }

    void applyPendingUpdate(){
        this->total += (this->pendingUpdate) * (this->getSegmentSize());
        this->pendingUpdate = 0;
    }

    void addUpdate(ll val){
        this->pendingUpdate += val;
    }

    int getSegmentSize(){
        return (end-start + 1);
    }
};

class SegmentTree{

    public:
    int N;
    SegmentTree(vll &arr){

        this->N = arr.size();
        this-> treeSize = getSegmentTreeSize(this->N);
        //cout<<"N treeSize:" <<N<<" "<<treeSize<<"\n";
        nodes.resize(this->treeSize);

        this->buildTree(arr,1,0,N-1);
    }

     void updateRange(int startPos, int endPos, ll val){
         //flip all coins in [startPos,endPos]
         updateRange(1,startPos,endPos,val);
     }
    ll getValue(int startPos, int endPos){
        auto res = getValue(1,startPos,endPos);
        return res.getValue();
    }
    private:
     vector<SegmentTreeNode> nodes;

     int treeSize;

     void buildTree(vll &arr,int stIndex, int left, int right){
         if(left==right){
             this->nodes[stIndex].assignLeaf(arr[left],left,right);
             return;
         }

         int mid = (left+right)/2;
         int leftIndex = 2*stIndex,rightIndex = leftIndex+1;

         buildTree(arr,leftIndex,left,mid);
         buildTree(arr,rightIndex,mid+1,right);

         nodes[stIndex].merge(nodes[leftIndex],nodes[rightIndex]);
     }

    void updateRange(int stIndex, int startPos, int endPos, ll val){
        if(startPos == nodes[stIndex].start and endPos == nodes[stIndex].end){
            nodes[stIndex].addUpdate(val);
            return;
        }

        int mid = (nodes[stIndex].start + nodes[stIndex].end)/2;
        int leftChildIndex = 2*stIndex, rightChildIndex = leftChildIndex + 1;

        if(endPos<=mid){
            updateRange(leftChildIndex,startPos,endPos,val);
        }else if(startPos>mid){
            updateRange(rightChildIndex,startPos,endPos,val);
        }else{
            updateRange(leftChildIndex,startPos,mid,val);
            updateRange(rightChildIndex,mid+1,endPos,val);
        }

        nodes[stIndex].merge(nodes[leftChildIndex],nodes[rightChildIndex]);
    }

    SegmentTreeNode getValue(int stIndex,int startPos, int endPos){
        if(startPos == nodes[stIndex].start and endPos == nodes[stIndex].end){
            auto result = nodes[stIndex];
            if(result.ifPendingUpdate())
                result.applyPendingUpdate();

            return result;
        }

        int mid = (nodes[stIndex].start + nodes[stIndex].end)/2;
        int leftChildIndex = 2*stIndex, rightChildIndex = leftChildIndex + 1;

        SegmentTreeNode result;

        if(endPos<=mid){
            result = getValue(leftChildIndex,startPos,endPos);
        }else if(startPos>mid){
            result = getValue(rightChildIndex,startPos,endPos);
        }else{
            auto leftResult = getValue(leftChildIndex,startPos,mid);
            auto rightResult = getValue(rightChildIndex,mid+1,endPos);

            result.merge(leftResult,rightResult);
        }

        if(nodes[stIndex].ifPendingUpdate()){
            result.addUpdate(nodes[stIndex].getPendingUpdate());
            result.applyPendingUpdate();
        }

        return result;
    }
     int getSegmentTreeSize(int N){
         int x = 1;
         while(x<N){
             x = x*2;
         }
         return x*2;
     }
};

int max_val = 2*mx5+5;

vector<pii> beg_end_odd(max_val+1,mp(-1,-1));
vector<pii> beg_end_even(max_val+1,mp(-1,-1));

vector<int> level(max_val+1,-1);

int time_odd =0;
int time_even = 0;

FenwickTreeRangeUpdate BIT_odd(max_val+1);
FenwickTreeRangeUpdate BIT_even(max_val+1);

const bool DEBUG = false;

void dfsPreCompute(int src, int lvl, int par, const vector<vi> &adj)
{
    if(lvl%2==1)
    {
        time_odd+=1;
        beg_end_odd[src].f=time_odd;
    } else
    {
        time_even+=1;
        beg_end_even[src].f=time_even;
    }

    level[src]=lvl;

    for(int u: adj[src])
    {
        if(u!=par)
        {
            dfsPreCompute(u, lvl+1, src, adj);
        }
    }

    if(lvl%2==1)
    {
        beg_end_odd[src].s=time_odd;
    } else
    {
        beg_end_even[src].s=time_even;
    }
}

void updateNode(int src, int val, const vector<vi> &adj, bool propogate = false)
{
    if(DEBUG)
    {   cout<<"\n\nUpdating src: "<<src<<"\n";
        cout<<"level[src]: "<<level[src]<<"\n";
        cout<<"val: "<<val<<"\n";
    }

    if(level[src]%2==1)
    {
        if(DEBUG)
        {   cout<<"beg_end_odd[src]: ";
            print(beg_end_odd[src]);
        }
        BIT_odd.updateRange(beg_end_odd[src], val);
    } else
    {
        if(DEBUG)
        {   cout<<"beg_end_even[src]: ";
            print(beg_end_even[src]);
        }
        BIT_even.updateRange(beg_end_even[src], val);
    }

    if(propogate)
    {
        for(int child: adj[src])
        {
            if(level[child]==level[src]+1)
            {
                updateNode(child, -val, adj, false);
            }
        }
    }

}

int queryNode(int src, const vi& a)
{

    if(level[src]%2==1)
    {
        return a[src] + BIT_odd.query(beg_end_odd[src].f);
    } else
    {
        return a[src] + BIT_even.query(beg_end_even[src].f);
    }
}
int main(void)
{
    ios_base::sync_with_stdio(false);

    // int n,q;
    // cin>>n>>q;

    // FenwickTreeRangeUpdate fenTree(n);

    // rep(j,1,q)
    // {
    //     int opt;
    //     cin>>opt;

    //     if(opt==1)
    //     {
    //         int l, r;
    //         ll val;
    //         cin>>l>>r>>val;

    //         fenTree.updateRange(l, r, val);
    //     } else if(opt==2)
    //     {
    //         int ind;
    //         cin>>ind;
    //         ll ans = fenTree.query(ind);
    //         cout<<ans<<"\n";
    //     }
    // }

    int n,q;

    cin>>n>>q;

    vi a(n+1,0);

    rep(j,1,n)
    {
        cin>>a[j];

    }

    vector<vi> adj(n+5);

    rep(edge,1,n-1)
    {
        int u,v;
        cin>>u>>v;
        adj[u].pb(v);
        adj[v].pb(u);
    }

    dfsPreCompute(1, 0, 0, adj);

    if(DEBUG)
    {   print(beg_end_odd);
        print(beg_end_even);
        print(level);
    }

    rep(qr,1 ,q)
    {
        int opt;
        cin>>opt;

        if(opt==1)
        {
            int x;
            ll val;
            cin>>x>>val;

            updateNode(x, val, adj, true);

        } else if(opt==2)
        {
            int x;
            cin>>x;

            ll ans = queryNode(x, a);
            cout<<ans<<"\n";
        }
    }

    return 0;
}


#include <bits/stdc++.h>
#define ll long long
#define mp make_pair
#define EPS 1e-15
#define MOD 1000000007
#define mid ((l+r)>>1)

/*
*
*Zaiiiin
*
*/

using namespace std;

typedef pair<int,int> ii;
typedef pair<ll,ll> pll;
typedef vector<ii> vii;
typedef vector<pll> vll;
typedef vector<int> vi;
typedef vector<ll> vl;

const long double pi = acos(-1);
const int n_ = 2e5 + 5;

int n, q, st[n_ << 5], nodes[n_ << 2], f[n_], b[n_], arr[n_], cnt, odd[n_ << 5], even[n_ << 5];
vi adj[n_];

void DFS(int u, int p = -1){
  nodes[++cnt] = u;
  for(int i: adj[u]){
    if(i != p){
      DFS(i, u);
      nodes[++cnt] = u;
    }
  }
}

void upd(int parity, int s, int e, int v, int id = 1, int l = 1, int r = cnt){
  if(s > r || e < l) return;
  if(s <= l && r <= e){
    (parity ? odd : even)[id] += v;
    return;
  }
  upd(parity, s, e, v, id << 1, l, mid);
  upd(parity, s, e, v, id << 1 | 1, mid + 1, r);
}

int get(int x, int id = 1, int l = 1, int r = cnt){
  if(l == r)
    return arr[x] + (odd[id] - even[id]) * (2 * (l & 1) - 1);
  if(odd[id]){
    odd[id << 1] += odd[id];
    odd[id << 1 | 1] += odd[id];
  }
  if(even[id]){
    even[id << 1] += even[id];
    even[id << 1 | 1] += even[id];
  }
  odd[id] = even[id] = 0;
  if(x <= mid) return get(x, id << 1, l, mid);
  else return get(x, id << 1 | 1, mid + 1, r);
}

int main()
{
  #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
  #else
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
  #endif

  scanf("%d %d", &n, &q);
  for(int i=1; i<=n; i++)
    scanf("%d", arr + i);
  for(int i=1; i<n; i++){
    int u, v;
    scanf("%d %d", &u, &v);
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  DFS(1);
  for(int i=1; i<=cnt; i++)
    b[nodes[i]] = i;
  for(int i=cnt; i; --i)
    f[nodes[i]] = i;
  int t, x, v;
  while(q--){
    scanf("%d", &t);
    if(t == 1){
      scanf("%d %d", &x, &v);
      upd(f[x] % 2, f[x], b[x], v);
    }else{
      scanf("%d", &x);
      printf("%d\n", get(f[x]));
    }
  }
  return 0;
}


#include <bits/stdc++.h>
#define ll long long
#define mp make_pair
#define EPS 1e-15
#define MOD 1000000007
#define mid ((l+r)>>1)

/*
*
*Zaiiiin
*
*/

using namespace std;

typedef pair<int,int> ii;
typedef pair<ll,ll> pll;
typedef vector<ii> vii;
typedef vector<pll> vll;
typedef vector<int> vi;
typedef vector<ll> vl;

const long double pi = acos(-1);
const int n_ = 2e5 + 5;

int n, q, st[n_ << 5], nodes[n_ << 2], f[n_], b[n_], arr[n_], cnt, odd[n_ << 5], even[n_ << 5];
vi adj[n_];

void DFS(int u, int p = -1){
  nodes[++cnt] = u;
  for(int i: adj[u]){
    if(i != p){
      DFS(i, u);
      nodes[++cnt] = u;
    }
  }
}

void upd(int parity, int s, int e, int v, int id = 1, int l = 1, int r = cnt){
  if(s > r || e < l) return;
  if(s <= l && r <= e){
    (parity ? odd : even)[id] += v;
    return;
  }
  upd(parity, s, e, v, id << 1, l, mid);
  upd(parity, s, e, v, id << 1 | 1, mid + 1, r);
}

int get(int x, int id = 1, int l = 1, int r = cnt){
  if(l == r)
    return arr[nodes[x]] + (odd[id] - even[id]) * (2 * (l & 1) - 1);
  if(odd[id]){
    odd[id << 1] += odd[id];
    odd[id << 1 | 1] += odd[id];
  }
  if(even[id]){
    even[id << 1] += even[id];
    even[id << 1 | 1] += even[id];
  }
  odd[id] = even[id] = 0;
  if(x <= mid) return get(x, id << 1, l, mid);
  else return get(x, id << 1 | 1, mid + 1, r);
}

int main()
{
  #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
  #else
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
  #endif

  scanf("%d %d", &n, &q);
  for(int i=1; i<=n; i++)
    scanf("%d", arr + i);
  for(int i=1; i<n; i++){
    int u, v;
    scanf("%d %d", &u, &v);
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  DFS(1);
  for(int i=1; i<=cnt; i++)
    b[nodes[i]] = i;
  for(int i=cnt; i; --i)
    f[nodes[i]] = i;
  int t, x, v;
  while(q--){
    scanf("%d", &t);
    if(t == 1){
      scanf("%d %d", &x, &v);
      upd(f[x] % 2, f[x], b[x], v);
    }else{
      scanf("%d", &x);
      printf("%d\n", get(f[x]));
    }
  }
  return 0;
}


#include<bits/stdc++.h>

using namespace std;
#define REPP(i,a,b,c) for(int i=a; i<=b; i+=c)
#define REP(i,a,b) REPP(i,a,b,1)
#define REVV(i,a,b,c) for(int i=a; i>=b; i-=c)
#define REV(i,a,b) REVV(i,a,b,1)
#define FOR(i,a) REP(i,0,(int)a-1)
#define FORD(i,a) REV(i,(int)a-1,0)
#define PB push_back
#define POB pop_back
#define FI first
#define SE second
#define MP make_pair
typedef long long ll;
typedef unsigned long long ull;
typedef pair < int , int > ii;
typedef vector < int > vi;
typedef vector < ii > vii;
typedef vector < ll > vl;

const ll MOD = 1e9 + 7;
const double EPS = 1e-9;
const int INF = 1e9;

ll addMod(ll a, ll b){
	if(a + b >= MOD) return a + b - MOD;
	return a + b;
}

ll mulMod(ll a, ll b){
	return (a*b)%MOD;
}

ll fast(ll a, ll b){
	if(b == 0) return 1;
	ll tmp = fast(a,b/2);
	tmp = mulMod(tmp,tmp);
	if(b & 1) tmp = mulMod(tmp,a);
	return tmp;
}

//////////////////////////////////////////////

const int N = 2e5;

vi G[N + 5];
int arr[N + 5];
int n,q;
int low[N + 5], num[N + 5];
int cnt;
int tree[2][4*N + 5];
int dep[N + 5];

void dfs(int u, int p){
	dep[u] = dep[p] + 1;
	low[u] = num[u] = ++cnt;
	FOR(i,G[u].size()){
		int v = G[u][i];
		if(v == p) continue;
		dfs(v,u);
		num[u] = max(num[u], num[v]);
	}
}

void update(int bi, int idx, int l, int r, int a, int b, int v){
	if(l >= a && r <= b){
		tree[bi][idx] += v;
		return;
	}
	if(l > b || r < a) return;
	int mid = (l + r) / 2;
	update(bi,idx*2,l,mid,a,b,v);
	update(bi,idx*2+1,mid+1,r,a,b,v);
}

int query(int bi, int idx, int l, int r, int a){
	if(l == r) return tree[bi][idx];
	int mid = (l + r) / 2;
	if(a <= mid) return tree[bi][idx] + query(bi,idx*2,l,mid,a);
	else return tree[bi][idx] + query(bi,idx*2+1,mid+1,r,a);
}

int main(){
	ios_base :: sync_with_stdio(0); cin.tie(0); cout.tie(0);
	memset(tree,0,sizeof tree);
	cin >> n >> q;
	REP(i,1,n) cin >> arr[i];
	int u,v,ins;
	FOR(i,n-1){
		cin >> u >> v;
		G[u].PB(v);
		G[v].PB(u);
	}
	dfs(1,0);
//	REP(i,1,n) printf("%d - %d\n",low[i],num[i]);
	int bi;
	while(q--){
		cin >> ins >> u;
		bi = dep[u] % 2;
		if(ins == 1){
			cin >> v;
			update(bi,1,1,n,low[u],num[u],v);
			update(1-bi,1,1,n,low[u],num[u],-v);
		}
		else{
			cout << query(bi,1,1,n,low[u]) + arr[u] << endl;
		}
	}
	return 0;
}


#include<bits/stdc++.h>

using namespace std;
#define REPP(i,a,b,c) for(int i=a; i<=b; i+=c)
#define REP(i,a,b) REPP(i,a,b,1)
#define REVV(i,a,b,c) for(int i=a; i>=b; i-=c)
#define REV(i,a,b) REVV(i,a,b,1)
#define FOR(i,a) REP(i,0,(int)a-1)
#define FORD(i,a) REV(i,(int)a-1,0)
#define PB push_back
#define POB pop_back
#define FI first
#define SE second
#define MP make_pair
typedef long long ll;
typedef unsigned long long ull;
typedef pair < int , int > ii;
typedef vector < int > vi;
typedef vector < ii > vii;
typedef vector < ll > vl;

const ll MOD = 1e9 + 7;
const double EPS = 1e-9;
const int INF = 1e9;

ll addMod(ll a, ll b){
	if(a + b >= MOD) return a + b - MOD;
	return a + b;
}

ll mulMod(ll a, ll b){
	return (a*b)%MOD;
}

ll fast(ll a, ll b){
	if(b == 0) return 1;
	ll tmp = fast(a,b/2);
	tmp = mulMod(tmp,tmp);
	if(b & 1) tmp = mulMod(tmp,a);
	return tmp;
}

//////////////////////////////////////////////

const int N = 2e5;

vi G[N + 5];
int arr[N + 5];
int n,q;
int low[N + 5], num[N + 5];
int cnt;
int tree[2][4*N + 5];
int dep[N + 5];

void dfs(int u, int p){
	dep[u] = dep[p] + 1;
	low[u] = num[u] = ++cnt;
	FOR(i,G[u].size()){
		int v = G[u][i];
		if(v == p) continue;
		dfs(v,u);
		num[u] = max(num[u], num[v]);
	}
}

void update(int bi, int idx, int l, int r, int a, int b, int v){
	if(l >= a && r <= b){
		tree[bi][idx] += v;
		return;
	}
	if(l > b || r < a) return;
	int mid = (l + r) / 2;
	update(bi,idx*2,l,mid,a,b,v);
	update(bi,idx*2+1,mid+1,r,a,b,v);
}

int query(int bi, int idx, int l, int r, int a){
	if(l == r) return tree[bi][idx];
	int mid = (l + r) / 2;
	if(a <= mid) return tree[bi][idx] + query(bi,idx*2,l,mid,a);
	else return tree[bi][idx] + query(bi,idx*2+1,mid+1,r,a);
}

int main(){
	ios_base :: sync_with_stdio(0); cin.tie(0); cout.tie(0);
	memset(tree,0,sizeof tree);
	cin >> n >> q;
	REP(i,1,n) cin >> arr[i];
	int u,v,ins;
	FOR(i,n-1){
		cin >> u >> v;
		G[u].PB(v);
		G[v].PB(u);
	}
	dfs(1,0);
//	REP(i,1,n) printf("%d - %d\n",low[i],num[i]);
	int bi;
	while(q--){
		cin >> ins >> u;
		bi = dep[u] % 2;
		if(ins == 1){
			cin >> v;
			update(bi,1,1,n,low[u],num[u],v);
			update(1-bi,1,1,n,low[u],num[u],-v);
		}
		else{
			cout << query(bi,1,1,n,u) + arr[u] << endl;
		}
	}
	return 0;
}


/*  Bismillahir Rahmanir Rahim  */

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

PII range[200005];
ll tree[200005];
int m,n,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 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);
/*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 ("%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);
            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 <int,int>
using namespace std;

PII range[200005];
ll tree[525000];
int num[200005],coeff[200005],fns;
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);
    }

    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 main ()
{
    int n,m,i,j,u,v;
    ll ans;

    scanf ("%d %d",&n,&m);
    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);
    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);
            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 range[200005];
ll tree[200005];
int m,n,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 main ()
{
    int i,j,u,v;
    ll ans;

    scanf ("%d %d",&n,&m);
    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);
/*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 ("%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);
            ans=(ans*coeff[u])+num[u];
            printf ("%lld\n",ans);
        }
    }

    return 0;
}