import Data.List      -- isPrefixOf
import Control.Monad  -- replicateM

replace from to str@(c : cs)
  | isPrefixOf from str = to ++ replace from to (drop (length from) str)
  | otherwise           = c : replace from to cs
replace _ _ [] = []

main  = do { n <- readLn ; replicateM n main' }
main' = do
  s <- getLine
  putStrLn . replace "Hoshino" "Hoshina" $ s