#include #include using namespace std; int main() { int n,count1,count2; cin >> n; vector c; for (int i = 0;i < n;i++) { int buf; cin >> buf; if (buf == 1)count1++; else if (buf == 2)count2++; } if (count1 % 2 != 0 || count1 % 2 != 0 && count2 == 2)cout << 'A' << endl; else cout << 'B' << endl; return 0; }