#yuki_582 n=int(raw_input()) c=map(int,raw_input().split()) c1=[] for x in c: if x!=0: c1.append(x) cc=c1.count(1) if (cc%2 and len(c1)==cc) or (cc%2 and c1.count(2)==1 and len(c1)==cc+1): print 'A' else: print 'B'