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