n = int(input()) C = list(map(int, input().split())) c1 = 0 c2 = 0 for c in C: if c == 1: c1 += 1 if c == 2: c2 += 1 if c2 == 0: if c1 == n and c1%2 == 1: print('A') else: print('B') else: if c2 == 1 and c1 == n-1 and c1%2 == 1: print('A') else: print('B')