iii=int(input())
sunukelist=[]
sunukenumber=0
#sn=0
 
#for j in range(len(i)):
#  sn=sn+int(i[j])
#mae=0
sn=0
max=0
min=0
j=2
while sunukenumber<iii:
  jj=str(j)
  for k in range(len(jj)):
    sn=sn+int(jj[k])
    
  if max<=j/sn:
    #print(str(j)+"-"+ str(j/sn) +"o ")
    sunukelist.append(j-1)
    max=j/sn
    #print("max="+str(max) +"sonotoki"+str(j))
    sunukenumber=sunukenumber+1
    
  #else:
    #print(str(j)+"-"+ str(j/sn) +"x ")
    
  sn=0
  j=j+1

  
for w in sunukelist:
  print(w)