#include <bits/stdc++.h>
using namespace std;
namespace IO {
const int MAXIOSIZE = 1 << 24 | 1;
unsigned char buf[MAXIOSIZE], *p1, *p2;
template <typename T>
void read(T& x) {
  x = 0;
  char ch =
      (p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 1 << 24, stdin), p1 == p2)
           ? EOF
           : *p1++);
  bool flg = false;
  for (; ch < '0' || '9' < ch;
       ch = (p1 == p2 &&
                     (p2 = (p1 = buf) + fread(buf, 1, 1 << 24, stdin), p1 == p2)
                 ? EOF
                 : *p1++))
    if (ch == '-') flg |= true;
  for (; '0' <= ch && ch <= '9';
       ch = (p1 == p2 &&
                     (p2 = (p1 = buf) + fread(buf, 1, 1 << 24, stdin), p1 == p2)
                 ? EOF
                 : *p1++))
    x = x * 10 + ch - '0';
  flg ? x = -x : 0;
}
template <typename T>
void out(const T& x) {
  if (x > 9) out(x / 10);
  putchar(x % 10 + '0');
}
template <typename T>
inline void write(const T& x, const char& ed = ' ') {
  if (x < 0)
    putchar('-'), out(-x);
  else
    out(x);
  putchar(ed);
}
}  // namespace IO
string str, ans;
int main() {
  getline(cin, str);
  for (int i = (0), iend = (str.size() - 1); i <= iend; ++i) {
    if (str[i] == ' ') continue;
    if (str[i] == ',') ans += str[i], ans += ' ';
    if (str[i] == '.') {
      if (ans.size() && ans[ans.size() - 1] != ' ') ans += ' ';
      ans += "...";
      i += 2;
    }
    if (isdigit(str[i])) {
      if (ans.size() && isdigit(ans[ans.size() - 1])) ans += ' ';
      while (isdigit(str[i])) ans += str[i], ++i;
      --i;
    }
  }
  for (int i = (ans.size() - 1), iend = (0); i >= iend; --i) {
    if (ans[i] == ' ')
      ans.erase(i);
    else
      break;
  }
  cout << ans;
  return 0;
}
