// yukicoder: No.582 キャンディー・ボックス3 // 2019.8.2 bal4u #include #if 1 #define gc() getchar_unlocked() #else #define gc() getchar() #endif int in() { // 非負整数の入力 int n = 0, c = gc(); // while (isspace(c)) c = gc(); do n = 10 * n + (c & 0xf); while ((c = gc()) >= '0'); return n; } int main() { int i, N, c, one, two, many; N = in(), one = two = many = 0; for (i = 0; i < N; i++) { if (c = in()) { if (c == 1) one++; else if (c == 2) two++; else many++; } } puts((one & 1) && two <= 1 && many == 0? "A": "B"); return 0; }