while True:
    try:
        inputt = input()
        lenn = len(inputt)
        cishu = lenn//8
        chuyu = lenn%8

        if cishu > 0:
            for i in range(cishu):
                print("".join(list(inputt)[i*8:i*8+8]))
            if chuyu > 0:
                print("".join(list(inputt)[cishu*8:cishu*8+chuyu])+"0"*(8-chuyu))
            else:
                pass
        else:
            print("".join(list(inputt)[cishu*8:cishu*8+chuyu])+"0"*(8-chuyu))
            
    except Exception:
        break