K = input()


def Sn(N1):
    Sn = 0
    N = str(N1)
    for i in range(len(N)):
        Sn = Sn + int(N[i])

    return Sn

R = []
for i in range(1,1000):
    X = 0
    for j in range(i,1000):
        if(i/Sn(i) <= j/Sn(j)):
            X = X + 1

        if (X ==  1000 - i ):
            R.append(i)


for i in range(0,int(K)):
    print(R[i])
