import re f=re.sub while 1:print f(' \B',' 1',f('(\D[a-z]*)',r' \1 ',raw_input()))[1:]