N = gets.to_i C = gets.split.map &:to_i puts C.max > 2 || C.count(1).even? ? :B : :A