import sys,collections sys.setrecursionlimit(10**7) def Is(): return [int(x) for x in sys.stdin.readline().split()] def Ss(): return sys.stdin.readline().split() def I(): return int(sys.stdin.readline()) def S(): return input() n = I() cs = Is() count = cs.count(1) print(cs) if count % 2 == 1 and max(cs) <= 2: print("A") else: print("B")