#include<iostream> #include<vector> #define maxn 200010 #define ll long long usingnamespacestd;
int n, a[maxn];
voidwork(){ for (int i = 1; i <= n; ++i) cin >> a[i]; vector<int> A[9]; ll ans = 0; for (int i = 1; i <= n; ++i) A[a[i] % 9].push_back(a[i]); for (int i = 0; i < 9; ++i) { for (auto u : A[i]) ans += (u - 1) / 9; ll sz = A[i].size(); ans -= sz * (sz - 1) / 2; } if (ans & 1) cout << "A" << "\n"; elsecout << "B" << "\n"; }