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