import std.algorithm, std.conv, std.range, std.stdio, std.string; void main() { auto n = readln.chomp.to!size_t; auto c = readln.split.to!(int[]).filter!"a > 0".array; n = c.length; if (n == 0) { writeln("B"); return; } auto b = c.count!"a >= 2"; writeln(b == 0 && n % 2 == 0 || b == 1 && n % 2 == 1 || b >= 2 ? "B" : "A"); }