var
n,k,i,x,co,ce,ca,cb:longint;
begin
assign(input,'oddevengame.in');
reset(input);
assign(output,'oddevengame.out');
rewrite(output);
while not eof do begin
read(n,k);
if (n=0)and(k=0) then break;
co:=0;ce:=0;
for i:=1 to n do begin
read(x);
if x and 1>0 then inc(co)
else inc(ce);
end;
if n=k then begin
if co and 1=1 then writeln('A')
else writeln('B');
continue;
end;
if (n-k) and 1>0 then ca:=(n-k+1) shr 1
else ca:=(n-k) shr 1;
cb:=(n-k) shr 1;
//writeln(co,' ',ce,' ',ca,' ',cb);
if (n-k) and 1>0 then begin
//writeln('A is the last one.');
if cb>=co then begin
writeln('B');continue;
end;
if (k and 1=0)and(cb>=ce) then writeln('B')
else writeln('A');
end
else begin
//writeln('B is the last one.');
if k and 1=0 then begin
writeln('B');continue;
end;
if ca>=ce then writeln('A')
else writeln('B');
end;
end;
close(input);
close(output);
end.