N = int(input()) C = list(map(int, input().split())) C.sort() C[-1] -= 1 if max(C) >= 2: print("B") elif sum(C) % 2: print("B") else: print("A")