#include using namespace std; int main(){ int n; cin >> n; int res = 0; int r2 = 0; for(int i=0,a;i> a; res |= a>2; r2 += a==2; } if(!res&&r2<2)cout << 'A' << endl; else cout << 'B' << endl; }