#include<stdio.h>
#include<string.h>

int main()
{
    char word[10];
    scanf("%s",word);
    int len=strlen(word);
    if(len<1 || len>10)
    {
        printf("Invalid input");
    }
    else
    {
        for(int i=0;i<len;i++)
        {
            for(int k=len+i-1;k>0;k+=2)
            {
                printf(" ");
            }
            for(int j=0;j<=i;j++)
            {
                printf("%c ",word[j]);
            }
            printf("\n");
        }
    }
    
}