n = int(input()) C = list(map(int, input().split())) c1 = 0 c2 = 0 total = 0 for c in C: if c == 1: c1 += 1 if c == 2: c2 += 1 if c > 0: total += 1 if c2 == 0: if c1 == total and c1%2 == 1: print('A') else: print('B') else: if c2 == 1 and c1 == total-1 and c1%2 == 1: print('A') else: print('B')