#include <bits/stdc++.h>
using namespace std;
int a[300][3], cn;
int main() {
  string s;
  getline(cin, s);
  int i = 0;
  while (i < s.size()) {
    if (s[i] == ' ') {
      i++;
      continue;
    }
    if (isdigit(s[i])) {
      cn++;
      a[cn][2] = 1;
      a[cn][1] = i;
      while (isdigit(s[i]) && i < s.size()) i++;
      a[cn][0] = i - 1;
    } else if (s[i] == ',') {
      i++;
      cn++;
      a[cn][0] = -1;
    } else if (s[i] == '.') {
      i += 3;
      cn++;
      a[cn][0] = -2;
    }
  }
  for (i = 1; i <= cn; i++) {
    if (a[i][2]) {
      for (int j = a[i][1]; j <= a[i][0]; j++) cout << s[j];
      if (i + 1 <= cn && a[i + 1][2]) cout << ' ';
    } else {
      if (a[i][0] == -1) {
        cout << ',';
        if (i != cn) cout << ' ';
      }
      if (a[i][0] == -2) {
        if (!(i == 1 || (i - 1 > 0 && a[i - 1][0] == -1))) cout << ' ';
        cout << "...";
      }
    }
  }
  return 0;
}
