#include <iostream>
#include <string>
#include <vector>

using namespace std;

/*
思路:如果输入字符串小于8,则补0至8位;如果大于8且无法整除8,则求余数,对其进程补0操作
*/
void SplitStr(string strIn)
{
    int strInLen = strIn.length();
    int interger = strInLen / 8;
    int remainder = strInLen % 8;
    
    for(int i = 0; i < interger; i++) {
       string strTemp = strIn.substr(i*8, 8); // 从i*8开始,8个字符进行分割
        cout<< strTemp<<endl;
    }
    if(remainder != 0) {
        string strTemp = strIn.substr(interger*8, remainder);
        for(int i = remainder; i < 8; i++) {
            strTemp += '0';
        }
        cout<<strTemp<<endl;
    }
    
    return;
}


int main()
{
    string strIn;
    while(cin>>strIn) {
        SplitStr(strIn);
    }
}