a=input() r=[0,0] s=set() while 1: r[-1]+=1 if r[-1]>len(a): del r[-1] s-={int(a[r[-2]:r[-1]],2)} continue if a[r[-1]:r[-1]+1]=='0': continue b=int(a[r[-2]:r[-1]],2) if b in s:#既出:次へ continue if r[-1]-r[-2]>5: del r[-1] s-={int(a[r[-2]:r[-1]],2)} continue if r[-1]==len(a): if s|{b}=={*range(1,len(s)+2)}: print(*[int(a[r[i]:r[i+1]],2)for i in range(len(r)-1)]) break else: del r[-1] s-={int(a[r[-2]:r[-1]],2)} continue s|={b} r+=[r[-1]]