n = int(input()) c = [int(a) for a in input().split() if a != '0'] sum_c = sum(c) print("B" if sum_c % 2 == 0 or len(c) + 1 < sum_c else "A")