import functools n = int(input()) c = sorted(map(int, input().split())) a_is_winning = False if (len(c) % 2 == 1 and c[-1] == 1) or \ (len(c) >= 2 and len(c) % 2 == 0 and c[-1] == 2 and c[-2] == 1): a_is_winning = True print('A' if a_is_winning else 'B')