_=int(input())
C=list(map(int,input().split()))
C=[c for c in C if c]

N=len(C)
C.sort()

if (N%2==0 and C==[1]*(N-1)+[2]) or  C==[1]:
    print("A")
else:
    print("B")