N = int(input()) C = ist(map(int,input().split())) count = 0 for i in C: if C == 2:count += 1 if count % 2 == 1: print('A') else: print('B')