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) if (x + y == N and y == 1) or (x + y == N and y == 0 and N%2 == 1): print('A') else: print('B')