#include
#include
#define IN 1
#define OUT 0

int main(int argc, char *argv[])
{  
    char c;
    int state;
    state=OUT;
    for(;(c=getchar())!=EOF;){
        if(c=='\n'||c=='\t'||c==' '){
            if(state==IN){
              state=OUT;
              putchar('\n');
            }
        }
        else {
              state=IN;
              putchar(c);
              }
    }
    system("PAUSE");    //asd
    return 0;
}