#include <bits/stdc++.h>
using namespace std;
char s[2000];
string ans, finans;
vector<pair<char, int> > v;
vector<string> fin;
int main() {
  int i, j;
  scanf(" %[^\n]", s);
  int n = strlen(s);
  for (i = 0; i < n;) {
    ans.clear();
    while (s[i] >= '0' && s[i] <= '9') {
      ans += s[i];
      i++;
    }
    fin.push_back(ans);
    while (s[i] == ' ') i++;
    if (s[i] == ',') {
      fin.push_back(",");
      i++;
    }
    if (s[i] == '.') {
      i += 3;
      fin.push_back("...");
    }
  }
  fin.push_back("9809");
  finans += ' ';
  for (i = 0; i < fin.size() - 1; i++) {
    if (fin[i] == ",")
      finans += (fin[i] + " ");
    else if (fin[i] == "...") {
      if (finans[finans.size() - 1] != ' ') finans += " ";
      finans += (fin[i]);
    }
    if (fin[i][0] >= '0' && fin[i][0] <= '9') {
      if (fin[i + 1][0] <= '9' && fin[i + 1][0] >= '0')
        finans += (fin[i] + " ");
      else
        finans += fin[i];
    }
  }
  j = finans.size() - 1;
  while (finans[j] == ' ') j--;
  for (i = 1; i <= j; i++) printf("%c", finans[i]);
  return 0;
}
