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

int main() {
    string str;
    while(cin >> str) {
        size_t c=0;
        size_t len = str.length();
        size_t i=0;
        while(i<len) {
            cout<<str[i];
            c++;
            if(c%8==0){
                cout<<endl;
                c=0;
            }
            i++;
        }
        while(c&&c<8)
        {
            cout<<'0';
            c++;
        }
        cout<<endl;
    }
}