#include <bits/stdc++.h>
using namespace std;
int a[100005];
bool isNumber(char c) {
  if (c == '0' || c == '1' || c == '2' || c == '3' || c == '4' || c == '5' ||
      c == '6' || c == '7' || c == '8' || c == '9')
    return true;
  return false;
}
int main() {
  string s, ans = "";
  getline(cin, s);
  int l = s.length();
  for (int i = 0; i < l; i++) {
    if (s[i] == ',' && i != l - 1)
      ans.append(", ");
    else if (s[i] == ',' && i == l - 1)
      ans += ",";
    else if (s.substr(i, 3) == "..." && i != 0) {
      ans += " ...";
      i += 2;
    } else if (s.substr(i, 3) == "..." && i == 0) {
      ans += "...";
      i += 2;
    } else if (isNumber(s[i]) && isNumber(s[i + 1]))
      ans += s[i];
    else if (isNumber(s[i]) && s[i + 1] == ' ') {
      ans += s[i];
      int j = i + 1;
      while (s[j] == ' ') {
        j++;
      }
      if (isNumber(s[j])) ans += " ";
      i = j - 1;
    } else if (s[i] != ' ')
      ans.push_back(s[i]);
    else if (s[i] == ' ') {
    }
  }
  int l2 = ans.length();
  string ans2 = "";
  for (int i = 0; i < l2; i++) {
    if (i != l2 - 1 && ans[i] == ' ' && ans[i + 1] == ' ') {
      ans2 += " ";
      i++;
    } else
      ans2 += ans[i];
  }
  cout << ans2 << endl;
  return 0;
}
