n = int(input()) C = list(map(int, input().split())) box1 = box2 = box3 = 0 for c in C: if c == 1: box1 += 1 elif c == 2: box2 += 1 elif c > 2: box3 += 1 if box1 % 2 == 1 and box2 <= 1 and box3 == 0: print("A") else: print("B")