n = int(input()) a = [int(a) for a in input().split()] if max(a) == 1 and a.count(1)%2 == 1: print("A") elif max(a) == 2 and a.count(2) == 1 and a.count(1)%2 == 1: print("A") else: print("B")