#include #include #include #include #include #include using ll = long long; #define MOD 1000000007 using namespace std; int main(){ int N; cin >> N; int x[4] = {0}; for(int i = 0; i < N; i++) { int c; cin >> c; switch (c) { case 0: x[0]++; break; case 1: x[1]++; break; case 2: x[2]++; break; default: x[3]++; break; } } if (x[1] % 2 == 1 && x[2] <= 1 && x[3] == 0) { cout << "A" << endl; } else { cout << "B" << endl; } return 0; }