#include <bits/stdc++.h>
using namespace std;
int main() {
  string inStr, outStr;
  getline(cin, inStr);
  for (int i = 0; i < inStr.size(); i++) {
    if (inStr[i] == ',') {
      outStr.push_back(inStr[i]);
      if (i != inStr.size() - 1) {
        outStr += " ";
      }
    } else if (inStr[i] == '.') {
      if ((i != 0) && (outStr[outStr.size() - 1] != ' ')) {
        outStr += " ";
      }
      outStr += "...";
      i += 2;
    } else if (inStr[i] == ' ') {
      if ((outStr[outStr.size() - 1] != ' ') &&
          (outStr[outStr.size() - 1] != ',') &&
          (outStr[outStr.size() - 1] != '.') && (inStr[i + 1] != ',') &&
          (inStr[i + 1] != ' ')) {
        outStr.push_back(inStr[i]);
      }
    } else {
      outStr.push_back(inStr[i]);
      int j = i;
      while (((j + 1) < (inStr.size() - 1)) && (inStr[j + 1] != ',') &&
             (inStr[j + 1] != '.') && (inStr[j + 1] != ' ')) {
        j++;
        outStr.push_back(inStr[j]);
        i = j;
      }
    }
  }
  cout << outStr;
  return 0;
}
