$<.gets.to_i.times do
  text = $<.gets.chomp
  result = ""
  po = 0
  while result.size < text.size
    if text[po, 7] == "Hoshino"
      result += "Hoshina"
      po += 7
    else
      result += text[po]
      po += 1
    end
  end
  puts result
end
