Problem:
Score : 500 points

Problem Statement

Let S(n) denote the sum of the digits in the decimal notation of n.
For example, S(123) = 1 + 2 + 3 = 6.

We will call an integer n a Snuke number when, for all positive integers m such that m > n, \frac{n}{S(n)} \leq \frac{m}{S(m)} holds.

Given an integer K, list the K smallest Snuke numbers.

Constraints

1 \leq K

The K-th smallest Snuke number is not greater than 10^{15}.

Input

Input is given from Standard Input in the following format:

K

Output

Print K lines. The i-th line should contain the i-th smallest Snuke number.

Sample Input 1

10

Sample Output 1

1
2
3
4
5
6
7
8
9
19

Solution in C# (Mono 4.6.2.0) (judge verdict: Wrong Answer)

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CompetitiveProgCsLib
{
	class MainProg
	{
		static string R => Console.ReadLine();
		static int RI => int.Parse(R);
		static long RL => long.Parse(R);
		static double RD => double.Parse(R);
		static int[] RIs => R.Split(' ').Select(int.Parse).ToArray();
		static double[] RDs => R.Split(' ').Select(double.Parse).ToArray();
		static void Out(object obj) => Console.WriteLine(obj);
		static void OutLine<T>(IEnumerable<T> obj, string separateChar) => Out(String.Join(separateChar, obj));
		static void Outb(bool b) => Out(b ? "Yes" : "No");
		static void OutB(bool b) => Out(b ? "YES" : "NO");
		static bool IsIn(int y, int x, int h, int w) => 0 <= x && x < w && 0 <= y && y < h;

		static void Main(string[] args)
		{
			var K = RL;
			long count = 0;
			for (int i = 1; i <= 9; i++)
			{
				Out(i);
				count++;
				if (count >= K) return;
			}
			for (int i = 1; i <= 9; i++)
			{
				Out(i + "9");
				count++;
				if (count >= K) return;
			}
			string nine = "99";
			int init = 1;
			int mm = 18;
			for (int i = init; i <= mm; i++)
			{
				Out(i + nine);
				count++;
				if (count >= K) return;
			}
			nine += "9";
			mm += 10;
			while (true)
			{
				for (int i = init; i <= mm; i++)
				{
					Out(i + nine);
					count++;
					if (count >= K) return;
				}
				nine += "9";
				init++;
				mm += 10;
				if (init >= 9)
				{
					init = 1;
					mm = 28;
				}
			}
		}
	}
}