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