import scala.io.StdIn.{readInt,readLine}

object Main extends App {
  val n = readInt
  for(i<- 0 until n) {
    var s = readLine
    for(j<-0 until s.length-6) {
      if(s.substring(j,j+7) == "Hoshino")
        s = s.updated(j+6,'a')
    }
    println(s)
  }
}