#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main(){
char teamName[100][100];
int pointer = 0;
while(gets(teamName[pointer]) != EOF){
if(strcmp(teamName[pointer],"END") == 0){
int columns,rows,index,maxLength = 0;
for(index = 0;index < pointer;index++){
if(strlen(teamName[index]) > maxLength){
maxLength = strlen(teamName[index]);
}
}
for(columns = 0;columns < maxLength;columns++){
for(rows = 0;rows < pointer;rows++){
printf("%c ",teamName[rows][columns] == '\0' ? ' ' : teamName[rows][columns]);
}
printf("\n");
}
exit(0);
}
pointer++;
}
return 0;
}