// editor4
#include <stdio.h>
#include <string.h>
#include <ctype.h>

int main(){
    char s[50];
    fgets(s, 50, stdin);
    s[strcspn(s, "\n")] = 0;
    
    if (!*s) {
        
        printf("Invalid input");
        return 0;
    }   
    
    for(int i = 0; s[i]; i++)
    
       if(isdigit(s[i])) {
           printf("Invalid input");
           return 0;
       }
       
    for (int i = 1; i <= strlen(s); i++)
        print("%.*s\n", i, s);
    
    
}