#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return !b ? a : gcd(b, a % b); }
long long lcm(long long a, long long b) { return (a / gcd(a, b)) * b; }
enum dir {
  DOWN = 0,
  UP,
  RIGHT,
  LEFT,
  DOWN_RIGHT,
  DOWN_LEFT,
  UP_RIGHT,
  UP_LEFT
};
int dir_r[] = {1, -1, 0, 0, 1, 1, -1, -1};
int dir_c[] = {0, 0, 1, -1, 1, -1, 1, -1};
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string s, ans;
  getline(cin, s);
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == ' ' && (!isalpha(s[i + 1]))) {
      s[i] = '*';
    } else {
      cout << s[i];
      if (!isalpha(s[i]) && s[i] != ' ' && s[i + 1] != ' ') cout << ' ';
    }
  }
  return 0;
}
