import re while 1:r=re.sub(' +" *',lambda m:r[m.start():m.end()],raw_input()+" "*99).strip();print r