#include using namespace std; int main() { int n; cin >> n; int64_t a[n]; for (auto &i : a) { cin >> i; if (3 <= i) { cout << 'B' << endl; return 0; } } int one = count(a, a + n, 1), two = count(a, a + n, 2); cout << "BA"[(one & 1) && (two <= 1)] << endl; return 0; }