#include using namespace std; #define REP(i,n) for(int i=0; i<(int)(n); i++) int main() { ios_base::sync_with_stdio(0); cin.tie(0); int n; cin >> n; int x = 0; int hist = 0; int sum = 0; REP (i, n) { int c; cin >> c; x = max(x, c); if (c == 2) hist++; sum += c; sum %= 2; } if (sum && x <= 2 && hist <= 1) cout << "A" << endl; else cout << "B" << endl; return 0; }