#include<stdio.h>
int main(void)
{
int state = 1;
char ch;
while ((ch = getchar()) != '#'){
if (ch == ' ' || ch == '\n' || ch == '\t'){
if (state == 1){
putchar('\n');
state = 0;
}
}
else
state = 1;
if (state){
putchar(ch);
}
}
}
当在单词里的时候state值为1,当在但此外时 state的值为0