void main(){ import std.stdio, std.string, std.conv, std.algorithm; int n; rd(n); auto a=readln.split.to!(long[]); auto s=reduce!("a+b")(a); if(s%2==0){writeln("B"); return;} auto c3=reduce!((res, e)=>res+(e>=3))(0, a); if(c3>0){writeln("B"); return;} auto c2=reduce!((res, e)=>res+(e==2))(0, a); if(c2>1) writeln("B"); else writeln("A"); } void rd(T...)(ref T x){ import std.stdio, std.string, std.conv; auto l=readln.split; foreach(i, ref e; x){ e=l[i].to!(typeof(e)); } }