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