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 bigs = length $ filter (>1) cs ; let answer = if bigs > 0 || even ones then "B" else "A" ; putStrLn answer }