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