import std.stdio, std.conv, std.string, std.bigint;
import std.math, std.random, std.datetime;
import std.array, std.range, std.algorithm, std.container;
string read(){ static string[] ss; while(!ss.length) ss = readln.chomp.split; string res = ss[0]; ss.popFront; return res; }

class X{
	long n;
	long sn;
	this(long n, long sn){
		this.n = n;
		this.sn = sn;
		}
	override string toString(){
		return n.to!string ~ ":" ~ sn.to!string;
		}
	bool ge(X y){
		if(this.n * y.sn >= y.n * this.sn) return 1;
		else return 0;
		}
	}


void main(){
	
	int k = read.to!int;

	X[] xs = [];
	
	for(int j = 1; j < 1_000_000; j ++){
		long n = j;
		long sn = snuke(n);
		xs ~= new X(n, sn);
		}
	debug writeln("xs:", xs);
	
	for(string nines = ""; nines ~= '9'; nines.length < 15){
		if(nines.length >= 10) break;
		for(int j = 1_000_000; j < 10_000_000; j ++){
			debug writeln("j:", j, " nines:", nines);
			string s = (j.to!string ~ nines);
			long n = s.to!long;
			long sn = snuke(n);
			xs ~= new X(n, sn);
			}
		}
	debug writeln("xs:", xs);
	
	X min = new X(1, 0);
	X[] ys = [];
	foreach_reverse(x; xs){
		if(min.ge(x)) min = x;
		if(min.ge(x)) ys ~= x;
		}
	debug writeln("ys:", ys);
	
	X[] answers = [];
	foreach_reverse(y; ys) answers ~= y;
	debug writeln("answers:", answers);
	
	foreach(a; answers[0 .. k]){
		a.n.writeln;
		}
	}

long snuke(long n){
	long sn = 0;
	long n2 = n;
	while(n2 > 0){
		sn += n2 % 10;
		n2 /= 10;
		}
	return sn;
	}

real sratio(long n){
	long sn = 0;
	long n2 = n;
	while(n2 > 0){
		sn += n2 % 10;
		n2 /= 10;
		}
	return n.to!real / sn.to!real;
	}
