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