N = int(input()) C = [int(i) for i in input().split()] count = 0 result = "A" sum = 0 for i in range(N): sum += C[i] if C[i] >= 3: result = "B" break if C[i] >= 2: count += 1 if count >= 2: result="B" break else: if sum % 2 == 0: result="B" print(result)