#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
    split_sentence
    ~~~~~~~~~~~~~~

    :synopsis: input: sentence, output: words
"""
import sys


if __name__ == '__main__':
    sys.stderr.write('input any sentence (Ctrl-D to finish)\n')
    while True:
        sentence = sys.stdin.readline()
        if sentence == '':  # EOF
            sys.exit(0)
        words = sentence.split(' ')
        for word in words:
            sys.stdout.write(word.strip('.,;:()[]"\'') + '\n')
            sys.stdout.flush()
