s = gets.chomp n = s.size if s[(n-2)..n-1] == "ai" puts "#{s[0..n-3]}#{s[n-2..n-1].upcase}" else puts "#{s}-AI" end