n = int(input()) c = list(map(int, input().split())) ones = sum(1 for x in c if x == 1) has_large = any(x > 1 for x in c) if has_large: print("A" if ones % 2 == 1 else "B") else: print("A" if ones % 2 == 1 else "B")