n = int(input()) c = list(map(int,input().split())) x,y = 0,0 for v in c: if v == 1: x += 1 elif v > 1: y += 1 ans = 'B' if y <= 1: num = x+2*y if num%2 == 1: ans = 'A' print(ans)