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