var s:string;i:byte=10;begin read(s);repeat writeln(s:i);dec(i);for i:=1to i do s[i]:=chr(abs(ord(s[i])-ord(s[i+1]))+48)until 0>0end.