module Main (main) where import Control.Applicative import Control.Monad import Data.List main :: IO () main = do { n <- readLn :: IO Int ; cs <- map read . words <$> getLine :: IO [Int] ; let ones = length $ filter (==1) cs ; let twos = length $ filter (==2) cs ; let bigs = length $ filter (>2) cs ; let answer = if bigs > 0 || (twos == 1 && odd ones) || (twos /= 1 && even ones) then "B" else "A" ; putStrLn answer }