#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  string in, out;
  while (cin >> in) {
    if (in.size() > 0 && out.size() > 0 && in[0] != ',' &&
        out[out.size() - 1] != ' ' && out[out.size() - 1] != '.')
      out += ' ';
    int i = 0;
    while (i < in.size()) {
      if (in[i] == '.') {
        if (out.size() > 0 && out[out.size() - 1] != ' ') out += ' ';
        out += "...";
        i += 3;
      } else if (in[i] == ',') {
        out += ", ";
        ++i;
      } else {
        out += in[i++];
      }
    }
  }
  if (out.size() > 0 && out[out.size() - 1] == ' ') out.erase(out.size() - 1);
  cout << out;
}
