import Control.Applicative
import Control.Monad
import Data.List

main :: IO ()
main = do
    hs <- getLine
    let f "" = Nothing
        f xs = let (a, b) = break (== ',') xs
                in Just (a, drop 1 b)
    let hss = unfoldr f hs
    putStrLn $ unwords hss