def main(): N = int(input()) boxes = list(map(int, input().split())) no_candy_box_count = boxes.count(0) one_candy_box_count = boxes.count(1) two_candy_box_count = boxes.count(2) if no_candy_box_count == N: print("B") elif no_candy_box_count + one_candy_box_count == N and one_candy_box_count % 2 == 1: print("A") elif two_candy_box_count == 1 and one_candy_box_count % 2 == 1: print("A") else: print("B") if __name__ == '__main__': main()