#include <bits/stdc++.h>
using namespace std;
string s, ans;
int m;
int main() {
  getline(cin, s);
  bool f = false;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == ' ') {
      f = true;
      continue;
    }
    if (s[i] == '.' && s[i + 1] == '.' && s[i + 2] == '.') {
      int len = ans.size();
      if (i != 0 && ans[len - 1] != ' ') {
        ans += " ...";
        m++;
        f = true;
      } else
        ans += "...";
      i += 2;
    }
    if (s[i] >= '0' && s[i] <= '9') {
      if (m == 0 && i != 0 && (s[i - 1] < '0' || s[i - 1] > '9') && f == true) {
        ans += " ";
      }
      ans += s[i];
      m = 0;
    }
    if (s[i] == ',') {
      if (i != s.size() - 1) {
        ans += ", ";
        m++;
        f = true;
      } else
        ans += ",";
    }
  }
  cout << ans;
  return 0;
}
