#include<iostream>
#include<cstdio>
//#include<fstream>

using namespace std ;

bool chr (const char * s , char ch  )
{
    int i = 0  ;
    while( s[ i ++ ]!= '\0' )
    {
        if ( s[ i ] == ch )
            return 1 ;
    }

    return  0 ;

}


int main()
{

    const char t[]= "-(){}[]-" ;
    char subtitle[ 105 ] ; int i = -1 ;
    cin.getline ( subtitle , 100 ) ;
    while ( subtitle [ i ++ ] != '\0' )
    {

        if ( chr(t ,subtitle[ i ] ) ) continue ;
        if ( subtitle[ i ] == ',' ) printf (" %c" , subtitle[ i ]  ) ;
        else printf ("%c" , subtitle[ i ]  ) ;

    }



    return 0 ;
}