import sys
import re
for i in range(2):
    line = sys.stdin.readline().strip()
    strs = re.findall(r'.{8}', line)
    if len(strs)*8!=len(line):
        strs.append(line[(len(strs)*8):].ljust(8,"0"))
    for i in strs: print(i)