n=int(input()) c=list(input().split()) w=c.count("1") v=c.count("0") if w%2!=0 and w+v==n: print("A") elif w%2!=0 and c.count("2")==1: print("A") else: print("B")