#include using namespace std; int main(void) { cin.tie(0); ios::sync_with_stdio(false); vector v; int n,x; long long int sum = 0; cin >> n; for(int i=0;i> x; if (x > 0) v.push_back(x); sum += x; } sort(v.begin(), v.end()); if (sum == 0) { cout << "B" << '\n'; } if (v.back() == 1) { if (sum % 2 == 0) { cout << "B" << '\n'; } else { cout << "A" << '\n'; } } map cnt; for(auto x : v) cnt[x] += 1; if (cnt[2] == 1 and v.size() == (cnt[1] + cnt[2]) and cnt[1] % 2 == 1) { cout << "A" << '\n'; } else { cout << "B" << '\n'; } return 0; }