#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:64000000")
using namespace std;
const double pi = 3.1415926535897932384626433832795;
double eps = 1e-9;
char _buf[1 << 20];
inline string gs() {
  scanf("%s", _buf);
  return string(_buf);
}
inline string gl() {
  gets(_buf);
  return string(_buf);
}
inline int gi() {
  int a;
  scanf("%d", &a);
  return a;
}
void solve();
int main() {
  solve();
  return 0;
}
void solve() {
  string s = gl();
  char prev = -1;
  int c = 0;
  for (int i = (0), _b(((int)s.size())); i < _b; ++i) {
    if (s[i] == '.') {
      if (prev != -1) printf(" ");
      printf("...");
      prev = '.';
      i += 2;
    } else if (s[i] == ',') {
      if (prev == ',') printf(" ");
      printf(",");
      prev = ',';
    } else if (s[i] != ' ') {
      if (prev == 0 && i && !isdigit(s[i - 1]))
        printf(" ");
      else if (prev == ',')
        printf(" ");
      printf("%c", s[i]);
      prev = 0;
    }
  }
  printf("\n");
}
