import Control.Monad

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 = unwords.map (swap before after).words

swap b a w = if b == w then a
                                       else w