#include<iostream>


int main() {

	double checksunuke[16];
	checksunuke[0] = 1.0;;
	int sunukebase = 19;

	for (int cntx = 1; cntx < 16; cntx++)
	{
		int outbase = sunukebase;
		int ninput = sunukebase;
		int nbase = 0;
		while (ninput > 0)
		{
			nbase += ninput % 10;
			ninput = ninput / 10;
		}
		checksunuke[cntx] = (double)outbase / nbase;
		int addn = (int)std::pow(10, (double)(cntx+1));
		sunukebase += addn;
	}

		int ninput = 0;
	int nbase = 0;
	std::cin >> ninput;
	int startint = 1;

	while (ninput > 0)
	{
		if (startint > 10e15)
		{
			std::cout << "err" << std::endl;
			break;
		}
		int outbase = startint;
		int ndd = startint;
		nbase = 0;

		int cnt = 0;
		while (ndd > 0)
		{
			nbase +=  ndd % 10;
			ndd =  ndd / 10;
			cnt++;
		}
		float output_b = (float)outbase / nbase;
		//std::cout << cnt << " "<< checksunuke[cnt - 1] << " "<< output_b << std::endl;
		if (checksunuke[cnt-1] >= output_b)
		{
			
			std::cout << startint  << std::endl;
			ninput--;
		}
		startint++;
	}
	return 0;
}
