#include <bits/stdc++.h>
using namespace std;
const long long maxN = 1e5 + 7, MOD = 1e9 + 7, inf = 1e9 + 7, N = 1e4 + 7;
long long n, x, pointer = 1, k, dif, help, next, cnt, y;
string d, s, ans;
int main() {
  getline(cin, d);
  for (long long i = 0; i < d.size(); i++) {
    if (d[i] != ' ') {
      if (d[i] == '.') {
        if (i && ans[ans.size() - 1] != ' ') ans += " ";
        ans += "...";
        i += 2;
      } else {
        if (d[i] == ',') {
          ans += ", ";
        } else {
          if (!i)
            ans += d[i];
          else {
            if (d[i - 1] == ' ' && ans[ans.size() - 1] <= '9' &&
                ans[ans.size() - 1] >= '0')
              ans += ' ';
            ans += d[i];
          }
        }
      }
    }
  }
  if (ans[ans.size() - 1] == ' ') ans.erase(ans.begin() + ans.size() - 1);
  return cout << ans << "\n", 0;
}
