n=input() while n>=0:print n;s=str(n);n-=int('1'+s[2+s.find('1'):])