input = gets.chomp if input[-2].include?("a") && input[-1].include?("i") puts input.gsub("ai","AI") else puts "#{input}-AI" end