n = int(input()) candies = list(map(int, input().split())) count = sum(1 for c in candies if c == 1) print("A" if count % 2 == 1 else "B")