import           Control.Applicative
import           Control.Monad

startWith _  [] = True
startWith [] _  = True
startWith (t : ts) (x : xs) | t == x    = startWith ts xs
                            | otherwise = False

hoge :: String -> String
hoge [] = []
hoge str@(x : xs) | startWith "Hoshino" str = "Hoshina" ++ hoge (drop 7 str)
                  | otherwise               = x : hoge xs

main = do
  n  <- readLn
  rs <- replicateM n $ fmap hoge getLine
  mapM_ putStrLn rs

