#include <bits/stdc++.h>
using namespace std;
int main() {
  int c = 0;
  string s;
  char u = 'a';
  while (cin >> s) {
    for (int i = 0; i < s.size(); i++) {
      if (u == ';')
        if (s[i] == '!' || s[i] == '?' || s[i] == '.' || s[i] == ',')
          cout << s[i];
        else
          cout << " " << s[i];
      else if (u == '!' || u == '?' || u == '.' || u == ',')
        cout << " " << s[i];
      else
        cout << s[i];
      u = s[i];
    }
    u = ';';
  }
  return 0;
}
