#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 ==1)two = 1; else { flag = 0; break; two++;} } else if (a > 2)flag = 0; if ((two>1) || flag == 0) { 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 cout << "A" << endl; return 0; }