N = int(input())
boxes = [int(x) for x in input().split()]

n1 = 0
n2 = 0
n3 = 0
for box in boxes:
    if box == 1:
        n1 += 1
    elif box == 2:
        n2 += 1
    elif box > 2:
        n3 += 1

if n1%2==1 and n2 <= 1 and n3 == 0:
    print('A')
else:
    print('B')