import           Control.Applicative
import           Control.Monad

startWith _  [] = False
startWith [] _  = True
startWith a@(t : ts) b@(x : xs) | a == b = True
                                | 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

