#include <bits/stdc++.h>
using namespace std;
int topush(char c) {
  int t = (int)c;
  if (t <= 122 && t >= 97) return 1;
  if (t <= 90 && t >= 65) return 1;
  return 0;
}
int main() {
  string str1, str2 = "";
  getline(cin, str1);
  int i = 0, l = str1.length();
  while (i < l) {
    if (topush(str1[i])) {
      str2 += str1[i];
      i++;
    } else {
      while (topush(str1[i]) == 0) {
        if ((int)str1[i] == 33 || (int)str1[i] == 44 || (int)str1[i] == 46 ||
            (int)str1[i] == 63)
          str2 += str1[i];
        i++;
      }
      str2 += " ";
    }
  }
  cout << str2;
  return 0;
}
