#include <bits/stdc++.h>
using namespace std;
int gc() {
  int c = fgetc(stdin);
  return c;
}
int main(void) {
  int i, j, k, n;
  vector<string> a;
  string s;
  for (;;) {
    int c = gc();
  loop:
    if (c == EOF) {
      break;
    }
    if (c == '.') {
      for (i = 0; i < 2; i++) {
        c = gc();
      }
      a.push_back("...");
    } else if (c == ',') {
      a.push_back(",");
    } else if (isdigit(c)) {
      s = "";
      while (isdigit(c)) {
        s += (char)c;
        c = gc();
        if (c == EOF) {
          break;
        }
      }
      a.push_back(s);
      goto loop;
    }
  }
  n = a.size();
  for (i = 0; i < n; i++) {
    if (a[i] == ",") {
      printf("%s", a[i].c_str());
      if (i < n - 1) {
        printf(" ");
      }
    } else if (a[i] == "...") {
      if (i > 0 && a[i - 1] != ",") {
        printf(" ");
      }
      printf("%s", a[i].c_str());
    } else {
      if (i > 0 && isdigit(a[i - 1][0])) {
        printf(" ");
      }
      printf("%s", a[i].c_str());
    }
  }
  printf("\n");
  return 0;
}
