N = int(input()) C = list(map(int,input().split())) if N == 1: if C[0] == 1: print('A') else: print('B') else: x = C.count(1) y = C.count(2) z = C.count(0) N -= z if (x + y == N and y == 1 and N%2 == 0) or (x + y == N and y == 0 and N%2 == 1): print('A') else: print('B')