#include #define rep(i,a,b) for(int i=a;i=b;i--) #define fore(i,a) for(auto &i:a) #pragma GCC optimize ("-O3") using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); } //--------------------------------------------------------------------------------------------------- /*---------------------------------------------------------------------------------------------------             ∧_∧       ∧_∧  (´<_` )  Welcome to My Coding Space!      ( ´_ゝ`) /  ⌒i     /   \    | |     /   / ̄ ̄ ̄ ̄/  |   __(__ニつ/  _/ .| .|____      \/____/ (u ⊃ ---------------------------------------------------------------------------------------------------*/ typedef long long ll; int N; //--------------------------------------------------------------------------------------------------- string solve() { vector v; ll sm = 0; rep(i, 0, N) { int x; cin >> x; if (x) v.push_back(x); sm += x; } sort(v.begin(), v.end()); if (sm == 0) return "B"; if (v.back() == 1) { if (sm % 2 == 0) return "B"; else return "A"; } map cnt; fore(x, v) cnt[x]++; if (cnt[2] == 1 and v.size() == (cnt[1] + cnt[2]) and cnt[1] % 2 == 1) return "A"; return "B"; } //--------------------------------------------------------------------------------------------------- void _main() { cin >> N; cout << solve() << endl; }