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 Practice
{
    class Program
    {

        static void Main(string[] args)
        {
            //SolveA(args);
            //SolveB(args);
            //SolveC(args);
            SolveD(args);
        }


        static void SolveA(string[] args)
        {
            string sz = (Console.ReadLine());
            int num = 0;
            for(int i=0;i<sz.Length;++i)
            {
                char c = sz[i];
                if( c == '+')
                {
                    num++;
                }else
                {
                    num--;
                }
            }
            Console.WriteLine(num);
        }
        static void SolveB(string[] args)
        {
            string sz = Console.ReadLine();
            long n = long.Parse(sz);
            int sn = 0;
            for (int i = 0; i < sz.Length; ++i)
            {
                int tmp = int.Parse(sz[i].ToString());
                sn += tmp;
            }
            if( n % sn == 0)
            {
                Console.WriteLine("Yes");
            }
            else
            {
                Console.WriteLine("No");
            }
        }
        static void SolveC(string[] args)
        {
            string[] szArr = Console.ReadLine().Split(' ');
            int n = int.Parse(szArr[0]);
            int k = int.Parse(szArr[1]);
            szArr = Console.ReadLine().Split(' ');
            int[] a = new int[szArr.Length];

            for (int i = 0; i < szArr.Length; ++i)
            {
                a[i] = int.Parse(szArr[i]);
            }
            int min = 1;

            if (n == k)
            {
                min = 1;
            }
            else
            {
                min = (int)Math.Ceiling((double)(n - 1) / (k-1));
            }
            Console.WriteLine(min);
            
        }

        static void SolveD(string[] args)
        {
            long k = long.Parse(Console.ReadLine());

            long cnt = 1;
            while(cnt < k)
            {

                long num = (long)( ((cnt % 9) +1)* Math.Pow(10, Math.Floor((double)cnt / 9)) - 1);
                Console.WriteLine(num);
                cnt++;
            }



        }
    }

}