#!/usr/bin/python3
# Encoding: utf8

# INPUT: raw text
# OUTPUT: tokens are separated by blanks including punctuation marks.

import sys
import re


for line in sys.stdin:
    line = line.strip()
    line = re.sub(r"\s\s+", r" ", line)
    regex = r"(\w)([\.\,\;\:\«\»\'\"\&\%\+\=\$\#\(\)\<\>\!\¡\?\¿\\\[\]\{\}\|\^\*\-\€\/\_\·\¬\~])"
    line = re.sub(regex, r"\1 \2", line)
    line = line.lower()
    print (line)

