#include	<vector>
#include	<iostream>
#include	<fstream>
#include	<algorithm>

using namespace std;

bool del (char ch){
    bool del = false;
    const char d[] = "(){}[].-";
    for(int i = 0 ; i <= 7 ; ++i)
        if(ch == d[i])
            del = true ;
    return(del);
}

int main(){
//    freopen("a.in","r",stdin) ;

    string t  ;
    getline(cin,t);

    for(int i = 0 ; i < t.size() ; ++i){
       if(del(t[i]))
           continue;
       else if (t[i+1] == ','){
        cout << t[i] << ' '  << ',';
        ++i ;
       }
       else cout << t[i] ;


    }



return (0);
}