N = gets.to_i C = gets.split.map(&:to_i) if C.all? { |c| c <= 1 } && C.count(1).odd? puts 'A' elsif C.count(1).odd? && C.count { |c| c == 2 } == 1 puts 'A' else puts 'B' end