#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  getline(cin, s);
  char x, y;
  vector<char> t;
  vector<char>::iterator k;
  if (s.size() == 1) {
    cout << s << endl;
    return 0;
  }
  int c;
  for (int i = 0; i < s.size(); ++i) {
    x = s[i];
    if (x != ' ') {
      if (x == ',') {
        c = t.size();
        if (c > 0 && t[c - 1] == ' ') t.pop_back();
        if (t.size() > 0) {
          c = t.back();
          if (c == ',') t.push_back(' ');
        }
        t.push_back(',');
        t.push_back(' ');
      } else if (x == '.') {
        c = t.size();
        if (c > 0 && t[c - 1] != ' ') t.push_back(' ');
        t.push_back('.');
        t.push_back('.');
        t.push_back('.');
        i = i + 2;
      } else {
        if (i + 1 < s.size() && isdigit(s[i + 1]))
          t.push_back(x);
        else {
          t.push_back(x);
          t.push_back(' ');
        }
      }
    }
  }
  y = t.back();
  if (y == ' ') t.pop_back();
  for (int i = 0; i < t.size(); ++i) cout << t[i];
}
