#include <bits/stdc++.h>
const int maxn = 2000;
char s[maxn], t[maxn];
int main() {
  gets(s);
  int n = 0;
  for (int i = 0; s[i]; i++) {
    if (s[i] == ',') {
      t[n++] = ',';
      t[n++] = ' ';
    } else if (s[i] == '.') {
      i += 2;
      if (n != 0 && t[n - 1] != ' ') t[n++] = ' ';
      t[n++] = '.';
      t[n++] = '.';
      t[n++] = '.';
    } else if (s[i] == ' ') {
    } else if (isdigit(s[i])) {
      if (isdigit(t[n - 1])) t[n++] = ' ';
      t[n++] = s[i];
      while (isdigit(s[i + 1])) {
        i++;
        t[n++] = s[i];
      }
    }
  }
  while (t[n - 1] == ' ') n--;
  t[n] = 0;
  puts(t);
  return 0;
}
