#include <bits/stdc++.h>
using namespace std;
int main() {
  char str[1000], ans[1000];
  int tot;
  while (gets(str)) {
    int len = strlen(str);
    while (str[len - 1] == ' ') {
      str[--len] = 0;
    }
    tot = 0;
    for (int i = 0; str[i];) {
      if (str[i] == ' ') {
        i++;
        continue;
      }
      if (str[i] == ',') {
        ans[tot++] = ',';
        if (str[i + 1]) ans[tot++] = ' ';
        i++;
        continue;
      }
      if (isdigit(str[i])) {
        if (tot > 0 && isdigit(ans[tot - 1])) {
          ans[tot++] = ' ';
        }
        while (isdigit(str[i])) {
          ans[tot++] = str[i];
          i++;
        }
        continue;
      }
      if (str[i] == '.') {
        if (tot > 0 && ans[tot - 1] != ' ') {
          ans[tot++] = ' ';
        }
        ans[tot++] = '.';
        ans[tot++] = '.';
        ans[tot++] = '.';
        i += 3;
      }
    }
    ans[tot] = 0;
    puts(ans);
  }
  return 0;
}
