#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, ans;
  char tmp[300];
  gets(tmp);
  s = tmp;
  int len = s.length();
  for (int i = 0; i < len; i++) {
    while (s[i] != '.' && s[i] != ' ' && s[i] != ',' && i < len) {
      ans += s[i];
      i++;
    }
    while (s[i] == ' ' && i < len) {
      i++;
    }
    if (i >= len) break;
    if (s[i] == '.') {
      if (ans.length() > 0 && ans[ans.length() - 1] != ' ') ans += " ";
      ans += "...";
      i += 2;
      continue;
    }
    if (i != len - 1 && s[i] == ',') {
      ans += ", ";
      continue;
    } else if (i == len - 1 && s[i] == ',') {
      ans += ",";
      continue;
    }
    if (ans.length() > 0 && ans[ans.length() - 1] != ' ' &&
        ans[ans.length() - 1] != '.')
      ans += " ";
    ans += s[i];
  }
  cout << ans << endl;
}
