#include <bits/stdc++.h>
using namespace std;
signed main() {
  string a, b = "";
  getline(cin, a);
  long long i, j;
  for (i = j = 0; i < a.length();) {
    if (a[i] == ',') {
      b += ", ";
      i++;
    } else if (a[i] == '.') {
      if (b.length() && b[b.length() - 1] != ' ') b += " ";
      b += "...";
      i += 3;
    } else if (a[i] >= '0' && a[i] <= '9') {
      if (b.length() &&
          (b[b.length() - 1] >= '0' && b[b.length() - 1] <= '9')) {
        b += " ";
      }
      for (; a[i] >= '0' && a[i] <= '9'; i++) {
        b += a[i];
      }
    } else {
      i++;
    }
  }
  if (b[b.length() - 1] == ' ') b.erase(b.length() - 1, 1);
  cout << b << endl;
  return 0;
}
