n = int(input()) C = list(map(int, input().split())) A = [] for c in C: if c != 0: A.append(c) else: n -= 1 tot = sum(A) if tot >= n + 2 or tot % 2 == 0: print("B") else: print("A")