    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;
    	real rn;
    	this(long n, real rn){
    		this.n = n;
    		this.rn = rn;
    		}
    	override string toString(){
    		return n.to!string ~ ":" ~ rn.to!string;
    		}
    	}
     
     
    void main(){
    	
    	int k = read.to!int;
     
    	X[] xs = [];
    	
    	for(int j = 1; j < 10000; j ++){
    		long n = j;
    		real rn = sratio(n);
    		xs ~= new X(n, rn);
    		}
    	debug writeln("xs:", xs);
    	
    	for(string nines = ""; nines ~= '9'; nines.length < 15){
    		if(nines.length >= 14) break;
    		for(int j = 10000; j < 100000; j ++){
    			debug writeln("j:", j, " nines:", nines);
    			string s = (j.to!string ~ nines);
    			long n = s.to!long;
    			real rn = sratio(n);
    			xs ~= new X(n, rn);
    			}
    		}
    	debug writeln("xs:", xs);
    	
    	real min = real.max;
    	X[] ys = [];
    	foreach_reverse(x; xs){
    		if(min > x.rn) min = x.rn;
    		if(min >= x.rn) 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;
    		}
    	}
     
    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;
    	}