n = gets.to_i c = gets.split.map(&:to_i) sum = c.inject(:+) if sum % 2 == 0 puts "B" else if c.count(1) == n || (c.count(1) == n - 1 && c.count(2) == 1) puts "A" else puts "B" end end