#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  ;
  string s;
  bool f = 0;
  getline(cin, s);
  for (int i = 0; i < s.size(); i++) {
    if (s[i] >= 'a' && s[i] <= 'z') {
      if (f) {
        cout << " " << s[i];
        f = 0;
      } else
        cout << s[i];
    } else if (s[i] == ' ')
      f = 1;
    else {
      cout << s[i];
      f = 1;
    }
  }
  return 0;
}
