#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  vector<string> ans;
  string t = "";
  string prev = "=";
  while (cin >> s) {
    if (s[0] >= '0' && s[0] <= '9' && prev[prev.length() - 1] >= '0' &&
        prev[prev.length() - 1] <= '9')
      t += " " + s;
    else
      t += s;
    prev = s;
  }
  stringstream ss(t);
  while (ss >> s) {
    int pos = 0;
    string cur = "";
    while (pos < s.length()) {
      if (s[pos] == '.') {
        if (cur != "") ans.push_back(cur);
        cur = "...";
        pos += 3;
        continue;
      }
      cur += s[pos];
      if (s[pos] == ',') {
        ans.push_back(cur);
        cur = "";
      }
      pos++;
    }
    if (cur != "") ans.push_back(cur);
  }
  for (int i = 0; i < ans.size() - 1; i++) cout << ans[i] << " ";
  cout << ans.back();
  return 0;
}
