def main(): N = int(input()) C = tuple(map(int, input().split())) cnt = 0 for i in C: if i >= 2: cnt += 1 sumc = sum(C) maxc = max(C) if maxc == 1: if sumc % 2: ans = 'A' else: ans = 'B' elif maxc == 2: if cnt == 1: ans = 'A' else: ans = 'B' else: ans = 'B' print(ans) main()