#include <bits/stdc++.h>
using namespace std;
const int MAXN = 0x3f3f3f3f;
const int MAXL = 0x7ffff;
inline void read(int &x) {
  x = 0;
  char c = getchar();
  while (c > '9' || c < '0') c = getchar();
  while (c <= '9' && c >= '0') {
    x = x * 10 + c - '0';
    c = getchar();
  }
}
inline void write(int re) {
  if (re > 9) write(re / 10);
  putchar(re % 10 + '0');
}
string a;
bool d;
int h;
int main() {
  getline(cin, a);
  int lena = a.size();
  for (int i = 0; i < lena; i++) {
    if (a[i] == '.') {
      if (i != 0 && h != 2) cout << ' ';
      cout << "...";
      h = 3;
      i += 2;
    }
    if (a[i] == ',') {
      if (i != lena - 1)
        cout << ", ";
      else
        cout << ",";
      h = 2;
    }
    if (h == 1 && a[i] == ' ' && isdigit(a[i + 1])) {
      cout << ' ';
      h = 0;
    }
    while (isdigit(a[i])) {
      cout << a[i];
      h = 1;
      d = 1;
      i++;
    }
    if (d == 1) i--;
    d = 0;
  }
}
