program criminald;
var n,m,k,i,w:longword;
l:longint; c:char;
t:array[1..1000]of byte;
procedure print(q:byte);
begin
case q of
0: writeln('Unknown');
1: writeln('Yes');
2: writeln('No');
end;
end;
begin
assign(input,'criminald.in'); reset(input);
assign(output,'criminald.out'); rewrite(output);
readln(n,m);
fillchar(t,sizeof(t),0);
for i:=1 to m do begin read(w); t[w]:=1; end;
readln;
repeat
read(c);
case c of
'A': begin
readln(w);
print(t[w]);
end;
'S': begin
readln(w,l);
if t[w]=1 then
begin
if l>0 then t[l]:=2 else t[-l]:=1;
end
else if t[w]=2 then begin
if l>0 then t[l]:=1 else t[-l]:=2;
end;
end;
'E': break;
end;
until c='E';
close(input); close(output);
end.