#include using namespace std; int main(){ int n; cin >> n; int res = 0; for(int i=0,j,a;i> a; res^= (a==1); } cout << (res?'A':'B') << endl; }