n = input() a = map(int,raw_input().split()) if n != len(a):exit() for i in xrange(len(a)): if a[i] < 0 or 1000000000 < a[i]:exit() if 3 <= a[i]: a[i] = -1 if a.count(-1)==0 and a.count(1)%2==1 and a.count(2)<=1: print("A") else: print("B")