n = gets().to_i()
n.times() do
  str = gets.split()
  str.each_with_index() do |word, idx|
    if word == "Hoshino"
      print("Hoshina")
    else
      print(word)
    end
    if idx == str.length() - 1
      puts()
    else
      print(" ")
    end
  end
end