k = int(input())
if k <= 10:
    for i in range(1, k):
        print(i)
else:
    for i in range(1, 10):
        print(i)

    for i in map(lambda x: str(x) + '9', range(1, k//10)):
        print(i)

    if str(k)[-1] == '9':
        print(k)
