#include <bits/stdc++.h>
using namespace std;
const int maxn = 1000;
char b[maxn];
string cur;
int l, i;
vector<string> v;
int main() {
  gets(b);
  l = strlen(b);
  for (i = 0; i < l; i++) {
    if (b[i] == ' ') {
      if (cur.size() && cur != " ") v.push_back(cur);
      cur = " ";
      continue;
    }
    if (b[i] == ',') {
      if (cur.size()) v.push_back(cur);
      cur = "";
      v.push_back(",");
      continue;
    }
    if (cur.size() && isdigit(cur[0]) && !isdigit(b[i])) {
      v.push_back(cur);
      cur = "";
    }
    if (cur.size() && cur == " ") {
      v.push_back(cur);
      cur = "";
    }
    cur += b[i];
    if (cur == "...") {
      v.push_back(cur);
      cur = "";
    }
  }
  if (cur.size()) v.push_back(cur);
  for (i = 0; i < v.size(); i++) {
    int next = i + 1;
    while (next < v.size() && v[next] == " ") ++next;
    if (v[i] == ",") {
      printf(",");
      if (next < v.size()) printf(" ");
      continue;
    }
    if (v[i] == "...") {
      int p = i - 1;
      while (p >= 0 && v[p] == " ") --p;
      if (p >= 0 && v[p] != ",") printf(" ");
      printf("...");
      continue;
    }
    if (isdigit(v[i][0])) {
      cout << v[i];
      if (next < v.size() && isdigit(v[next][0])) printf(" ");
      continue;
    }
  }
  printf("\n");
  return 0;
}
