s = gets.split("").map(&:to_s) if s.last(2) == ["a", "i"] then s.pop(2) s << ["A", "I"] puts s.join("") else puts "#{s.join("")}-AI" end