#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; long long MOD = 1000000007; int main() { int N; cin >> N; int a,b,c; a = b = c = 0; for ( int i = 0; i < N; i++ ) { long long x; cin >> x; if ( x == 1 ) { a++; } else if ( x == 2 ) { b++; } else if ( x > 2 ) { c++; } } if ( !c && ( ( a == N && a%2 ) || ( a == N-1 && b == 1 && N%2 == 0 ) ) ) { cout << "A" << endl; } else { cout << "B" << endl; } return 0; }