long s;main(i,a){for(;~scanf("%d",&a);)a&&--i?s+=a:0;puts(s&s+i<2?"A":"B");}