import Control.Monad
import Data.List

main = do
    n <- readLn
    sentences <- replicateM n getLine
    mapM_ putStrLn $ map hoshino2hosina sentences

hoshino2hosina :: String -> String
hoshino2hosina = swapWord "Hoshino" "Hoshina"

swapWord :: String -> String -> String -> String
swapWord before after str
  | length str < length before = str
  | before `isPrefixOf` str = after ++ swapWord before after (newstr)
  | otherwise               = head str : (swapWord before after $ tail str)
    where
        newstr = drop (length before) str