#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
int main()
{
char s[100];
scanf("%s",s);
int x,y;
int len = strlen(s);
for(y = (len-1)/2; y >= 0; y--)
{
x = len + 2 - 2 * y;
if(y <= x) break;
}
for(int i = 0; i < y-1; i++)
{
printf("%c",s[i]);
for(int j = 0; j < x - 2; j++) printf(" ");
printf("%c\n",s[len-1-i]);
}
for(int i = y-1; i <= x+ y -2; i++)
printf("%c",s[i]);
return 0;
}