c=raw_input() while len(c):print c;c="".join([str(abs(int(x)-int(c[i+1]))) for i,x in enumerate(c[:-1])])