import Control.Monad
import Control.Applicative

correct :: [String] -> [String]
correct [] = []
correct (x:xs) =
  if x == "Hoshino"
    then "Hoshina" : correct xs
    else x : correct xs

solver :: [[String]] -> [String]
solver = map (unwords . correct)

main :: IO()
main = do
  n <- (read :: String -> Int) <$> getLine
  inputs <- map words <$> replicateM n getLine
  mapM_ putStrLn $ solver inputs