N = int(input()) lsC = list(map(int,input().split())) B = len(lsC)-lsC.count(0) if B % 2== 1 and lsC.count(1)==B: print('A') elif B % 2==0 and lsC.count(1)==B-1 and lsC.count(2) == 1: print('A') else: print('B')