import scala.io.Source.stdin
import scala.io.StdIn._

object Main {
  def main(args: Array[String]) = {
    val n = readInt
    for (i <- 0 until n) {
      val s = readLine
      println(s.replace("Hoshino", "Hoshina"))
    }
  }
}