#include <bits/stdc++.h>
using namespace std;
int main() {
  ios ::sync_with_stdio(false);
  cin.tie(NULL);
  string s;
  getline(cin, s);
  vector<char> v;
  int slen = s.length();
  for (int i = 0; i < slen; i++) {
    if (s[i] >= '0' && s[i] <= '9')
      v.push_back(s[i]);
    else if (s[i] == ',') {
      v.push_back(s[i]);
      if (i != slen - 1) v.push_back(' ');
    } else if (s[i] == '.') {
      if (i != 0 && v.back() != ' ') v.push_back(' ');
      v.push_back('.');
      v.push_back('.');
      v.push_back('.');
      i += 2;
    } else if (s[i] == ' ') {
      if (s[i + 1] >= '0' && s[i + 1] <= '9' && v.back() >= '0' &&
          v.back() <= '9')
        v.push_back(' ');
    }
  }
  for (int i = 0; i < v.size(); i++) cout << v[i];
  return 0;
}
