#include <bits/stdc++.h>
using namespace std;
int main() {
  char str[260];
  while (gets(str)) {
    vector<string> v;
    int len = strlen(str);
    for (int i = 0; i < len;) {
      if (str[i] == ',')
        v.push_back(string(",")), ++i;
      else if (str[i] == '.') {
        v.push_back(string("..."));
        i += 3;
      } else if (str[i] == ' ') {
        while (i < len && str[i] == ' ') ++i;
      } else {
        string tmp;
        tmp.clear();
        for (; i < len && str[i] >= '0' && str[i] <= '9'; ++i)
          tmp.push_back(str[i]);
        v.push_back(tmp);
      }
    }
    for (int i = 0; i < v.size(); ++i) {
      if (v[i] == string(",")) {
        printf(",");
        if (i < v.size() - 1) printf(" ");
      } else if (v[i] == string("...")) {
        if (i && v[i - 1] != string(",")) printf(" ");
        printf("...");
      } else {
        printf("%s", v[i].c_str());
        if (i + 1 < v.size() && v[i + 1][0] >= '0' && v[i + 1][0] <= '9')
          printf(" ");
      }
    }
    printf("\n");
  }
  return 0;
}
