#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define all(x) (x).begin(),(x).end() #define rep(i,m,n) for(int i = m;i < n;++i) #define pb push_back #define fore(i,a) for(auto &i:a) #define rrep(i,m,n) for(int i = m;i >= n;--i) #define INF INT_MAX/2 using namespace std; using ll = unsigned long long int; using R = double; using Data = pair>; const ll MOD = 1e9 + 7; const ll inf = 1LL << 50; struct edge { ll from; ll to; ll cost; }; int main() { int n; cin >> n; int check = 0; int cnt1 = 0; int cnt2 = 0; int cnt0 = 0; rep(i, 0, n) { int c; cin >> c; check += c % 2; if (c == 1)cnt1++; else if (c == 2)cnt2++; else if(c == 0)cnt0++; } if (check % 2 == 0) { cout << "B" << endl; }else{ if ((cnt1 == n-cnt0 - 1 && cnt2 == 1) || cnt1 == n-cnt0) { cout << "A" << endl; } else { cout << "B" << endl; } } return 0; }