#include <bits/stdc++.h>
using namespace std;
vector<char> ch1;
int main() {
  string s, str = "";
  getline(cin, s);
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == '.') {
      ch1.push_back('-');
      i = i + 2;
      continue;
    }
    if (s[i] == ' ' && s[i + 1] >= '0' && s[i + 1] <= '9' &&
        ch1.back() >= '0' && ch1.back() <= '9') {
      ch1.push_back('/');
    }
    if (s[i] != ' ') ch1.push_back(s[i]);
  }
  for (int i = 0; i < ch1.size(); i++) {
    if (ch1[i] == '-' && ch1[i + 1] != '-')
      str = str + "...";
    else if (ch1[i] == '-' && ch1[i + 1] == '-')
      str = str + "..." + ' ';
    else if (ch1[i] == ',')
      str = str + ch1[i] + ' ';
    else if (ch1[i] == '/')
      str = str + ' ';
    else if (ch1[i] >= '0' && ch1[i] <= '9' && ch1[i + 1] == '-')
      str = str + ch1[i] + ' ';
    else
      str = str + ch1[i];
  }
  if (str.back() == ' ') str.erase(str.length() - 1, 1);
  cout << str;
}
