#include <bits/stdc++.h>
using namespace std;
char c[300];
string rez, rz1;
int main() {
  gets(c);
  int lenth = strlen(c);
  rez = c;
  for (int i = 0; i < lenth; i++)
    if (rez[i] != ',')
      rz1.push_back(rez[i]);
    else {
      rz1.push_back(rez[i]);
      if (i == lenth - 1) break;
      i++;
      while (i < lenth && rez[i] == ' ') i++;
      if (i != lenth) {
        char b = ' ';
        rz1.push_back(b);
      }
      i--;
    }
  rez = rz1;
  rz1.clear();
  lenth = rez.size();
  for (int i = 0; i < lenth; i++)
    if (i + 2 < lenth && rez[i] == rez[i + 1] && rez[i + 1] == rez[i + 2] &&
        rez[i + 2] == '.') {
      if (i != 0) {
        if (rez[i - 1] != ' ') {
          char b = ' ';
          rz1.push_back(b);
        }
      }
      rz1.push_back(rez[i]);
      rz1.push_back(rez[i]);
      rz1.push_back(rez[i]);
      i = i + 2;
    } else
      rz1.push_back(rez[i]);
  rez = rz1;
  rz1.clear();
  lenth = rez.size();
  for (int i = 0; i < lenth; i++)
    if (rez[i] - '0' >= 0 && rez[i] - '0' <= 9) {
      rz1.push_back(rez[i]);
      int j = i + 1;
      while (j < lenth && rez[j] == ' ') j++;
      if (j != i + 1 && j < lenth && rez[j] - '0' >= 0 && rez[j] - '0' <= 9) {
        char b = ' ';
        rz1.push_back(b);
        rz1.push_back(rez[j]);
        i = j;
      }
    } else
      rz1.push_back(rez[i]);
  rez = rz1;
  rz1.clear();
  lenth = rez.size();
  for (int i = 0; i < lenth; i++)
    if (rez[i] == ' ') {
      if ((i > 0 && rez[i - 1] == ',') ||
          (i + 2 < lenth && rez[i + 1] == rez[i + 2] &&
           rez[i + 2] == rez[i + 3] && rez[i + 3] == '.') ||
          (i > 0 && i + 1 < lenth && rez[i - 1] - '0' >= 0 &&
           rez[i - 1] - '0' <= 9 && rez[i + 1] - '0' >= 0 &&
           rez[i + 1] - '0' <= 9))
        rz1.push_back(rez[i]);
    } else
      rz1.push_back(rez[i]);
  printf("%s", rz1.c_str());
  return 0;
}
