from collections import Counter

_ = int(input())
cb = list(map(int, input().split()))
cc = Counter(cb)
cc.pop(0, None)
c1, c2 = cc.pop(1, 0), cc.pop(2, 0)
if c1 & 1 == 0 or c2 > 1 or len(cc):
    print('B')
else:
    print('A')