#include using namespace std; long n,c,s,a; main() { cin>>n; for(int i=0;i>a,s+=a,c+=a>1; cout<<(s%2&&a<2?"A":"B")<