N = int(input()) A = list(map(int,input().split())) C = {0:0,1:0,2:0} for i in range(N): C[A[i]] = C.get(A[i],0)+1 N -= C[0] if N%2==0 and C[1]==N-1 and C[2]==1 or C[1]==N and N%2==1: print("A") else: print("B")