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