#include <bits/stdc++.h>
using namespace std;
int main() {
  char ss[1000];
  cin.getline(ss, 1000);
  string s;
  s = ss;
  int i = 0, j, n = s.size(), del = 1;
  while (i < n) {
    n = s.size();
    for (i = 0; i < n; i++)
      if (s[i] == ' ' &&
          !(i && i + 1 < n && isdigit(s[i - 1]) && isdigit(s[i + 1]))) {
        s.erase(i, 1);
        break;
      }
  }
  string out;
  for (i = 0; i < s.size(); i++) {
    if (i + 3 <= s.size() && s.substr(i, 3) == "...") {
      if (i)
        out = out + " ...";
      else
        out = out + "...";
      i += 2;
    } else
      out = out + s[i];
  }
  s = out, out = "";
  for (i = 0; i < s.size(); i++) {
    out.push_back(s[i]);
    if (s[i] == ',' && i + 1 != s.size() && s[i + 1] != ' ') out.push_back(' ');
  }
  cout << out << endl;
  return 0;
}
