program xxxx;
var m,n,i,x,y:longint;
f,mm:array[1..50000] of longint;
chr:char;
begin
assign(input,'criminald.in');
reset(input);
assign(output,'criminald.out');
rewrite(output);
read(n,m);
for i:=1 to n do
f[i]:=0;
for i:=1 to m do
begin
read(mm[i]);
x:=mm[i];
f[x]:=2;
end;
repeat
begin
read(chr);
if chr='A' then
begin
readln(x);
if f[x]=1 then
writeln('No');
if f[x]=2 then
writeln('Yes');
if f[x]=0 then
writeln('Unknown');
end;
if chr='S' then
begin
readln(x,y);
if f[x]=1 then
begin
if y>0 then
f[y]:=2
else
f[-y]:=1;
end;
if f[x]=2 then
begin
if y>0 then
f[y]:=1
else
f[-y]:=2;
end;
end;
if chr='E' then
break;
end
until
chr='E';
close(input);
close(output);
end.