#include <bits/stdc++.h>
using namespace std;
int main() {
  string j, l = "";
  getline(cin, j);
  int i = 0;
  while (i < j.length()) {
    while (i < j.length() && j[i] == ' ') i++;
    if (j[i] == ',') {
      cout << ",";
      if (i != j.length() - 1) cout << " ";
      l = "c";
      i++;
    } else if (j[i] == '.') {
      if (i == 0 || l == "c")
        cout << "...";
      else
        cout << " ...";
      i += 3;
      l = "d";
    } else {
      if (l == "n") cout << " ";
      while (i < j.length() && j[i] <= '9' && j[i] >= '0') {
        cout << j[i];
        i++;
      }
      l = "n";
    }
  }
}
