import java.util.*;
public class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        String input=sc.nextLine();
        int length=input.length();
        int lastSize=length%8;
        int cycle=length/8;
        String printStr=input;
        if(length<8){
            for(int i=0;i<8-length;i++){
                printStr +=0;
            }
            System.out.println(printStr);
            return;
        }
        for(int i=0;i<cycle;i++){
            System.out.println(printStr.substring(i*8,(i+1)*8));
            
        }
        String lastStr=printStr.substring(cycle*8);
        if(lastSize!=0){
            for(int i=0;i<8-lastSize;i++){
                lastStr +=0;
            }
        }
        System.out.println(lastStr);            
    }
}