#include <bits/stdc++.h>
using namespace std;
const double pi = 2.0 * acos(0.0);
const double eps = 1.0e-9;
const int dr[] = {-1, 0, 1, 0}, dc[] = {0, 1, 0, -1};
const int dr6[] = {1, 1, 0, -1, -1, 0}, dc6[] = {0, 1, 1, 0, -1, -1};
const int dr8[] = {-1, -1, 0, 1, 1, 1, 0, -1},
          dc8[] = {0, 1, 1, 1, 0, -1, -1, -1};
int main(void) {
  int kase = 1000000000;
  char s[1024];
  for (int ks = 1; ks <= kase && NULL != gets(s); ++ks) {
    vector<string> v;
    for (int i = 0, j; s[i]; i = j)
      if (' ' == s[i])
        j = i + 1;
      else {
        if (',' == s[i])
          v.push_back(","), j = i + 1;
        else if ('.' == s[i])
          v.push_back("..."), j = i + 3;
        else {
          string num;
          for (j = i; isdigit(s[j]); ++j) num += s[j];
          v.push_back(num);
        }
      }
    for (int i = 0, j = 0; i < v.size(); ++i)
      if (v[i] == ",") {
        printf(",");
        if (i + 1 < v.size()) printf(" "), j = 1;
      } else {
        bool sp =
            (i > 0 && !j &&
             (v[i] == "..." || (isdigit(v[i][0]) && isdigit(v[i - 1][0]))));
        if (sp) printf(" ");
        printf(v[i].c_str());
        j = 0;
      }
    puts("");
  }
  return 0;
}
