i = long(raw_input()) while i >= 0: k = str(i).count('0') if str(i)[0] == '1': k -= 1 j = long('1' + '0' * k) print i i -= j