#include <bits/stdc++.h>
using namespace std;
template <class T>
T inline sqr(T x) {
  return x * x;
}
template <class T>
inline void relaxMin(T &a, T b) {
  a = min(a, b);
}
template <class T>
inline void relaxMax(T &a, T b) {
  a = max(a, b);
}
string str(int i) {
  char s[100];
  sprintf(s, "%d", i);
  return string(s);
}
inline int sign(int x) { return x > 0 ? 1 : (x < 0 ? -1 : 0); }
inline int myAbs(int a) { return a > 0 ? a : -a; }
const int mlen = (int)2e5 + 10;
int n;
char s[mlen];
int main() {
  gets(s);
  n = strlen(s);
  int i = 0;
  while (i < n && s[i] <= 32) i++;
  while (i < n) {
    char ch = s[i];
    int l;
    if (ch == ',')
      l = 1;
    else if (ch == '.')
      l = 3;
    else
      l = n;
    while (l > 0 && i < n && isdigit(ch) == isdigit(s[i])) putchar(s[i++]), l--;
    while (i < n && s[i] <= 32) i++;
    if (i < n && (ch == ',' || s[i] == '.' || (isdigit(ch) && isdigit(s[i]))))
      putchar(' ');
  }
  puts("");
  return 0;
}
