#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:16777216")
using namespace std;
const double PI = 2 * acos(0.0);
const double EPS = 1e-8;
const int INF = 1000000000;
char ss[1000];
string s;
int main() {
  gets(ss);
  s = string(ss);
  int i = 0;
  while (i < s.size())
    if (s[i] == ' ') {
      if (!(i && s[i - 1] >= '0' && s[i - 1] <= '9' && i < (int)s.size() - 1 &&
            s[i + 1] >= '0' && s[i + 1] <= '9'))
        s.erase(i, 1);
      else
        ++i;
    } else
      ++i;
  i = 0;
  while (i < s.size())
    if (s[i] == ',') {
      if (i < (int)s.size() - 1) s = s.insert(i + 1, " ");
      ++i;
    } else if (i < (int)s.size() - 2 && s[i] == '.' && s[i + 1] == '.' &&
               s[i + 2] == '.') {
      if (i) {
        if (s[i - 1] != ' ') {
          s = s.insert(i, " ");
          i += 4;
        } else
          i += 3;
      } else
        i += 3;
    } else
      ++i;
  cout << s;
  return 0;
};
