n=gets.to_i c=gets.split.map(&:to_i) if c.max<=2 && c.count(2)<=1 && c.inject(:+)%2==1 then puts 'A' else puts 'B' end