while True:
    try:
        a = input()
        num = len(a)
        num_chu = num // 8
        num_yu = num % 8
        i = 0
        while True:
            if num <= 8:
                num_bu = 8 - num
                numstr = '0' * num_bu
                out_str = a[0 + i * 8:8 + i * 8] + numstr
                print(out_str)
                break
            else:
                out_str = a[0 + i * 8:8 + i * 8]
                num -= 8
                print(out_str)
                i += 1
    except:
        break