#include <iostream>
#include<string>
using namespace std;

int main() {
    string line;
    while (getline(cin,line)) { // 注意 while 处理多个 case
        int count=0;
        for(char c:line)
        {
            cout<<c;
            count++;
            if(count%8==0)
             cout<<endl;  
        }
        if(count%8)
        for(int i=0;i<8-count%8;i++)
        cout << "0";
    }
}
// 64 位输出请用 printf("%lld")