1
2 s=raw_input()
3 def tsplit(string, delimiters):
4 """Behaves str.split but supports multiple delimiters."""
5 delimiters = tuple(delimiters)
6 stack = [string,]
7 for delimiter in delimiters:
8 for i, substring in enumerate(stack):
9 substack = substring.split(delimiter)
10 stack.pop(i)
11 for j, _substring in enumerate(substack):
12 stack.insert(i+j, _substring)
13 return stack
14
15 li=tsplit(s,(' ','.','?',';'))
16 for i in range(len(li)):
17 print li[i]
18