def get_ans(s):
    if not s: return None
    if len(s)==8: return s
    elif 0<len(s)<8: return add_zero(s)
    else:
        li=[]
        tup=divmod(len(s),8)
        for i in range(tup[0]):
            li.append(s[8*i:8*(i+1)])
        if tup[-1]!=0:
            li.append(get_ans(s[-tup[1]:]))
        return '\n'.join(li)

def add_zero(s):
    li=[]
    for i in s: li.append(i)
    length=len(li)
    for i in range(length,8):
        li.append('0')
    return ''.join(li)

if __name__=='__main__':
    import sys
    lines = []
    while True:
        line = sys.stdin.readline().strip()
        if line == "":
            break
        lines.append(line)
    # 单个取
    for item in lines:
        print(get_ans(item))