#define _USE_MATH_DEFINES #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; char solve(vector c) { int n = c.size(); long long sum = accumulate(c.begin(), c.end(), 0LL); sort(c.rbegin(), c.rend()); if(c[0] == 1 && sum % 2 == 1) return 'A'; else if(n > 1 && c[1] == 1 && c[0] == 2 && sum % 2 == 1) return 'A'; else return 'B'; } int main() { int n; cin >> n; vector c(n); for(int i=0; i> c[i]; cout << solve(c) << endl; return 0; }