program a

integer(8) :: n,k,i,j,jj,j1,jj1,b,c,cou=0
double precision :: su1,su2

read(*,*) k


b = 2
c = 0

do

	su1 = 0
	su2 = 0
	j = b * 10 ** c - 1
	jj = (b+9) * 10 ** c - 1
	j1 = b * 10 ** c - 1
	jj1 = (b+9) * 10 ** c - 1
	
	do 
		su1 = su1 + mod(j,10)
		if(j <= 9) then
			goto 100
		else
			j = j / 10
		endif
	enddo
	100 continue
	
	do 
		su2 = su2 + mod(jj,10)
		if(jj <= 9) then
			goto 200
		else
			jj = jj / 10
		endif
	enddo
	
	200 continue
	su1 = j1 / su1
	su2 = jj1 / su2
	
	if(su1 > su2) then
		b = b / 10 + 1
		c = c + 1
	else
		b = b + 1
		cou = cou + 1
		write(*,*) j1
		if(cou == k) then
		goto 300
		endif
	endif

enddo

300 continue


end program