#include <stdio.h>
#define MAXLINE 1000
int main()
{
char line[MAXLINE]="";
char c;
int i=0;
int k,j;
int z=0;
c=getchar();
while (c != EOF){
i=0; z=0;
while( (i<MAXLINE)&&(c!='\n') ){
if(c==' ') {
k=i;
line[i] = c;
i=i+1;
z=z+1;
c=getchar();
if((c != ' ') && ((z)%4==0)){
line[i-1]='\t';
line[i]=c;
z=z+1;
i=i+1;
c=getchar();
}
while (c ==' ') {
line[i]=c;
i=i+1;
z=z+1;
if(z%4==0){
line[k]='\t';
i=k+1;
z=z+1;
}
c=getchar();
}
}
else{
line[i]=c;
c=getchar();
i++;
z++;
}
}
printf("%s\n", line);
for(j=0; j<MAXLINE; j++)
line[j]=NULL;
c=getchar();
}
return 0;
}