N = int(input()) C = list(map(int,input().split())) one = 0 two = 0 more = False for i in range(N): if C[i]==1: one+=1 if C[i]==2: two+=1 if C[i]>2: more=True if not more and two<=1: if (one+two*2)%2==1: print('A') else: print('B') else: print('B')