#include <bits/stdc++.h>
using namespace std;
const int mx = 30000;
template <typename... T>
void read(T&... args) {
  ((cin >> args), ...);
}
template <typename... T>
void write(T&&... args) {
  ((cout << args << " "), ...);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  string s;
  getline(cin, s);
  stringstream ss(s);
  string word = "";
  int chk = 0;
  while (ss >> word) {
    if (!(word[0] == '.' or word[0] == ',' or word[0] == '!' or
          word[0] == '?')) {
      if (chk)
        cout << " ";
      else
        chk++;
    }
    cout << word[0];
    for (int i = 1; word[i]; ++i) {
      if (word[i - 1] == '.' or word[i - 1] == ',' or word[i - 1] == '!' or
          word[i - 1] == '?')
        cout << " " << word[i];
      else
        cout << word[i];
    }
  }
  return 0;
}
