let str;
while(str = readline()){
    getStr(str)
}
function getStr(str){
    let resStr;
    if(str.length == 8){
        resStr = str;
        console.log(resStr)
    }else if(str.length < 8){
        resStr = str.padEnd(8,'0');
        console.log(resStr)
    }else{
        let restStr = str.slice(8);
        resStr = str.slice(0,8);
        console.log(resStr)
        getStr(restStr);
    }
}