s=input() a=s[0:8] b=s[8:16] c=s[16:24] d=s[24:] print(a,b,c,d) print(int(a,2),int(b,2),int(c,2),int(d,2))