#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)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 (one % 2==1)flag = 0; } if (flag == 0)cout << "B" << endl; else cout << "A" << endl; return 0; }