N = int(input()) C = [int(c) for c in input().split() if c != '0'] print('B' if sum(C)%2 == 0 or len(C)+1 < sum(C) else 'A')