n = int(input()) C = list(map(int, input().split())) Counter = [0, 0, 0] for i in range(n): if C[i] == 0: continue elif C[i] == 1: Counter[0] += 1 elif C[i] == 2: Counter[1] += 1 else: Counter[2] += 1 if Counter[2] > 0: print("B") elif Counter[1] <= 1 and Counter[0] % 2 == 1: print("A") else: print("B")