{$m 10000500}
const maxn = 1000000;
var
fwt,wage:array[0..maxn] of int64;
f,t,p,tin,tout:array[0..maxn] of longint;
x,y,pred,ii,timer,n,m,i,j:longint;
ch:chAR;
procedure addedge(const x, y:longint);
begin
inc(ii);
t[ii]:=y;
p[ii]:=f[x];
f[x]:=ii;
end;
procedure dfs(const k:longint);
var
q:longint;
begin
inc(timer); tin[k]:=timer;
q:=f[k];
while q>0 do
begin
dfs(t[q]);
q:=p[q];
end;
tout[k]:=timer;
end;
procedure fwt_modify(j, x:longint);
begin
while j<=n do
begin
inc(fwt[j], x);
j:=j or (j-1)+1;
end;
end;
function fwt_findsum(j:longint):int64;
var
res:int64;
begin
res:=0;
while j>0 do
begin
inc(res, fwt[j]);
j:=j and (j-1);
end;
fwt_findsum:=res;
end;
begin
{ assign(input, 'in.txt');
reset(input);
assign(output, 'out.txt');
rewrite(output);}
readln(n, m);
readln(wage[1]);
for i:=2 to n do
begin
readln(wage[i], pred);
addedge(pred, i);
end;
dfs(1);
for i:=1 to m do
begin
read(ch);
if ch = 'u' then
begin
readln(x);
writeln(fwt_findsum(tin[x])+wage[x]);
end else
begin
readln(x, y);
fwt_modify(tin[x]+1, y);
fwt_modify(tout[x]+1, -y);
end;
end;
close(output);
end.
eyRtIDEwMDAwNTAwfQpjb25zdCBtYXhuID0gMTAwMDAwMDsKCnZhcgogIGZ3dCx3YWdlOmFycmF5WzAuLm1heG5dIG9mIGludDY0OwogIGYsdCxwLHRpbix0b3V0OmFycmF5WzAuLm1heG5dIG9mIGxvbmdpbnQ7CiAgeCx5LHByZWQsaWksdGltZXIsbixtLGksajpsb25naW50OwogIGNoOmNoQVI7Cgpwcm9jZWR1cmUgYWRkZWRnZShjb25zdCB4LCB5OmxvbmdpbnQpOwpiZWdpbgogIGluYyhpaSk7CiAgdFtpaV06PXk7CiAgcFtpaV06PWZbeF07CiAgZlt4XTo9aWk7CmVuZDsKCnByb2NlZHVyZSBkZnMoY29uc3Qgazpsb25naW50KTsKdmFyCiA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