#include<iostream>
#include<string>
using namespace std;

int main()
{
    string str, res = "";

    while( cin >> str )
    {
        int size = str.size();
        if( size <= 2 );
        else if( size == 3 )
        {
            if( str[2] == '.' || str[2] == ',' );
            else
                res += " " + str;
        }
        else if( 4 <= size && size <= 6 )
        {
            if( str[size-1] == '.' || str[size-1] == ',' )
            {
                res += " ";
                for( int i = 0; i < size - 1; i++ )
                    res += str[i];
            }
            else
                res += " " + str;
        }
        else if( size == 7 )
        {
            if( str[6] == '.' || str[6] == ',' )
            {
                res += " ";
                for( int i = 0; i < size - 1; i++ )
                    res += str[i];
            }
            else;
        }
        else;
    }
    for( int i = 1; i < res.size(); i++ )
        cout << res[i];
    cout << endl;
    return 0;
}
