N = int(input()) C = list(map(int, input().split())) one, two = 0, 0 for C_i in C: if C_i == 1: one += 1 if C_i == 2: two += 1 if C_i >= 3: print('B') exit() if two >= 2: print('B') exit() if (two == 1 and one % 2 == 1) or (two == 0 and one % 2 == 1): print('A') else: print('B')