#include <bits/stdc++.h>
using namespace std;
int main() {
  char c[1000], r[1000];
  gets(c);
  int l = strlen(c);
  int rl = 0;
  for (int i = 0; i < l;) {
    if (c[i] == '.') {
      r[rl++] = ' ';
      for (int j = 0; j < 3; j++) r[rl++] = '.';
      i += 3;
    } else {
      r[rl++] = c[i];
      if (c[i] == ',') r[rl++] = ' ';
      i++;
    }
  }
  r[rl] = 0;
  l = 0;
  for (int i = 0; i < rl; i++) {
    if (r[i] == ' ' && r[i + 1] == ' ') continue;
    c[l++] = r[i];
  }
  c[l] = 0;
  rl = 0;
  for (int i = 0; i < l; i++) {
    bool ok = 1;
    if (c[i] == ' ') {
      ok = 0;
      if (i == 0)
        ok = 0;
      else if (c[i - 1] == ',')
        ok = 1;
      else if (c[i + 1] == '.')
        ok = 1;
      else if ('0' <= c[i - 1] && c[i - 1] <= '9' && '0' <= c[i + 1] &&
               c[i + 1] <= '9')
        ok = 1;
    }
    if (ok) r[rl++] = c[i];
  }
  int st = 0;
  while (r[st] == ' ') st++;
  while (rl >= 0 && r[rl - 1] == ' ') rl--;
  r[rl] = 0;
  printf("%s\n", r + st);
  return 0;
}
