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