#include #include #include #include using lint = long long; void solve() { int n; std::cin >> n; std::vector xs(n); for (auto& x : xs) std::cin >> x; lint sum = std::accumulate(xs.begin(), xs.end(), 0LL); if (sum == 0) { std::cout << "B" << std::endl; return; } std::sort(xs.rbegin(), xs.rend()); --xs.front(); std::sort(xs.rbegin(), xs.rend()); --sum; std::cout << (xs.front() > 1 || sum % 2 != 0 ? "B" : "A") << std::endl; } int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); solve(); return 0; }