#include <bits/stdc++.h>
using namespace std;
int main() {
  string s1, s2;
  getline(cin, s1);
  if (s1[0] == '.')
    s2 += "...";
  else
    s2 += s1[0];
  int sz = s2.size();
  for (int i = sz; i < s1.size(); i++) {
    if (s2[sz - 1] == ',' ||
        ((s2[sz - 1] == '.' || isdigit(s2[sz - 1])) && s1[i] == '.')) {
      s2 += ' ';
    }
    if (s1[i] == '.') {
      s2 += "...";
      i += 2;
    } else if (s1[i] != ' ') {
      if (isdigit(s1[i]) && !isdigit(s1[i - 1]) && isdigit(s2[sz - 1]))
        s2 += ' ';
      s2 += s1[i];
    }
    sz = s2.size();
  }
  cout << s2 << endl;
}
