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: print('A') else: print('B')