#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main(int argc, char *argv[]) {
char data[100][100] = {0};
int i,j,count,max_length = 0;
while(fgets(data[count],100,stdin)){
if(max_length > sizeof(data[count])){
max_length = max_length;
}else{
max_length = sizeof(data[count]);
}
count ++;
}
for(i=0;i<max_length;i++){
for(j=count-1;j>=0;j--){
if(i>=sizeof(data[j])){
if(j!=0){
printf(" ");
}else{
printf("");
}
}else{
printf("%c", data[j][i]);
}
}
printf("\n");
}
return 0;
}