#include #include using namespace std; int main() { int i, n, a, one, two, flag = 1; one = two = 0; cin >> n; for (i = 0; i < n; i++) { cin >> a; if (a == 1)one++; else if (a == 2) { if (two == 0) { two = 1; } else { flag = 0; two++; } } else if (a > 2)flag = 0; if (flag == 0) { break; } } if (flag == 1) { if (two == 0) { if (one % 2 == 0) { flag = 0; } }//2以上の数があるとき else if (two == 1) { if (one % 2 == 0) { flag = 0; } } } if (flag == 0)cout << "B" << endl; else if (flag == 1) cout << "A" << endl; return 0; }