x=int(input()) while x>-1:print x;x-=10**len(str(x-1))/10