#include <bits/stdc++.h>
using namespace std;
char temp[100000 + 123];
int main() {
  gets(temp);
  int statu = 2;
  for (int i = 0; temp[i]; ++i) {
    if (isalpha(temp[i])) {
      if (statu == 0) putchar(' ');
      putchar(temp[i]);
      statu = 2;
    } else if (isblank(temp[i])) {
      if (statu != 1) statu = 0;
    } else {
      putchar(temp[i]);
      putchar(' ');
      statu = 1;
    }
  }
  return 0;
}
