lines = []
while True:
    try:
        lines.append(input())
    except:
        break


for line in lines:
    i = 0
    while True:
        cur_value, cur_len = line[i:i+8], len(line[i:i+8])
        if cur_len == 8:
            print(cur_value)
            i += 8
        elif cur_len < 8 and cur_len != 0:
            print(cur_value + '0'*(8-cur_len))
            break
        elif cur_len == 0:
            break