n = gets().to_i()
pr_str = Array.new(n, "")
n.times() do
  str = gets.split()
  pr_line = ""
  str.each_with_index() do |word, idx|
    if word == "Hoshino"
      pr_line << "Hoshina"
    elsif word == "Hoshino."
      pr_line << "Hoshina."
    else
      pr_line << word
    end
    if idx == str.length() - 1
      pr_line << "\n"
    else
      pr_line << ' '
    end
  end
  pr_str << pr_line
end
pr_str.each() do |str|
  print(str)
end