def min(s): if len(s)<8: while len(s)<8: s+='0' return s while True: try: s=input() re=[] for i in range(0,len(s),8): re.append(min(s[i:i+8])) for i in re: print(i) except: break