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