#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define REP(i,n) for(int i=0; i=b; --i) #define ALL(c) (c).begin(), (c).end() typedef long long ll; typedef vector VI; typedef vector VL; typedef vector VVL; typedef vector VVI; typedef pair P; typedef pair PL; int main() { int n; cin >> n; int one = 0, two = 0, three = 0; REP(i,n){ int x; cin >> x; if (x == 1) one ^= 1; if (x == 2) two++; if (x >= 3) three++; } bool a = false; if (one && ((two == 1 && !three) || (two + three == 0))) a = true; cout << (a ? "A" : "B") << endl; return 0; }