def ascan; gets.split.map(&:to_i);end n = gets.to_i yy = ascan abort '1' unless n == yy.size abort '2' unless yy.select{|e| e.abs > 1e9.to_i}.empty? puts "AC"