#include using namespace std; template T gcd(T x, T y) { if (y == 0) return x; return gcd(y, x % y); } template T lcm(T x, T y) { if (x == 0 || y == 0) return 0; return x / gcd(x, y) * y; } int main() { int N; cin >> N; vector C(N); for (int i = 0; i < N; i++) { cin >> C[i]; } sort(C.begin(), C.end()); int cnt1 = 0, cnt2 = 0; for (int i = 0; i < N; i++) { if (C[i] == 1) cnt1++; else if (C[i] == 2 && cnt2 < 1) cnt2++; else break; } cout << (cnt1 % 2 == 1 || cnt1 % 2 == 1 && cnt2 == 1 ? 'A' : 'B') << endl; }