replace _ _ [] = []
replace pre post (x:xs) = (if x==pre then post else x) : replace pre post xs

replace' str = replace "Hoshino" "Hoshina" str

main = do{
    n<-getLine;
    getContents>>=mapM_ putStrLn.map (unwords.replace'.words).lines;
}