#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,n; a = b = c = 0; n = N; 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++; } else { n--; } } if ( !c && ( ( a == n && n%2 ) || ( a == n-1 && b == 1 && n%2 == 0 ) ) ) { cout << "A" << endl; } else { cout << "B" << endl; } return 0; }