#include using namespace std; string S; string ans; int main() { // assert(freopen("lumber_dashes.in", "r", stdin)); // assert(freopen("lumber_dashes.out", "w", stdout)); cin.sync_with_stdio(false); getline(cin, S); for (size_t i = 0; i < S.size(); i++) { if (S[i] != '.' && S[i] != '-') { if (S[i] == ',') { if (i == 0 || S[i - 1] != ' ') { ans += ' '; } ans += ','; if (i + 1 == S.size() || S[i + 1] != ' ') { ans += ' '; } } else { ans += S[i]; } } } cout << ans << endl; return 0; }