# 2つ以上のキャンディが入った箱が一つでもあればB君は勝敗を裏返せる = 必ず勝ち # キャンディが1つ入った箱が奇数個か、キャンディが2つ入った箱が1つと1つ入った箱が奇数個あればAの勝ち N = int(input()) C = list(map(int,input().split())) one_box = 0 two_box = 0 multi_box = 0 for c in C: if c == 1: one_box += 1 elif c == 2: two_box += 1 elif c > 2: multi_box += 1 if one_box % 2 == 1 and two_box <= 1 and multi_box == 0: print("A") else: print("B")