#include <bits/stdc++.h>
using namespace std;
template <class T>
T abs(T x) {
  return x > 0 ? x : -x;
}
int n;
int m;
char w[300];
int main() {
  gets(w);
  string s(w);
  for (int i = 0; i < ((int)(s).size()); i++)
    while (i + 1 < ((int)(s).size()) && s[i] == ' ' && s[i + 1] == ' ')
      s.erase(i, 1);
  for (int i = 1; i + 1 < ((int)(s).size()); i++)
    if (s[i] == ' ')
      if (!(s[i - 1] >= '0' && s[i - 1] <= '9') ||
          !(s[i + 1] >= '0' && s[i + 1] <= '9'))
        s.erase(i, 1);
  for (int i = 0; i < ((int)(s).size()); i++)
    if (s[i] != ' ') {
      int space = 0;
      if (i > 0) {
        if (s[i - 1] == ',') space = 1;
        if (s[i] >= '0' && s[i] <= '9') {
          if (s[i - 1] == ' ') space = 1;
        }
        if (s[i] == '.') {
          if (s[i - 1] == 'a')
            s[i] = 'b';
          else if (s[i - 1] == 'b')
            s[i] = 'c';
          else {
            s[i] = 'a';
            space = 1;
          }
        }
      }
      if (space) printf(" ");
      if (i == 0 && s[i] == '.') s[i] = 'a';
      if (s[i] == 'a' || s[i] == 'b' || s[i] == 'c')
        printf(".");
      else
        printf("%c", s[i]);
    }
  printf("\n");
  return 0;
}
