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++ (GCC 5.4.1) (judge verdict: Wrong Answer)

#include "bits/stdc++.h"
using namespace std;
#define MOD 1000000007
#define FOR(i,a,b) for(long long i=(a);i<(b);i++)
#define REP(i,n)  FOR(i,0,n)
#define ITR(itr,mp) for(auto itr = (mp).begin(); itr != (mp).end(); ++itr)
#define dump(x)  cout << #x << " = " << (x) << endl;
#define debug(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;
typedef long long ll;
typedef pair<ll,ll> P;
typedef vector<P> Graph;


ll power(ll x, ll n) {
        ll t;
        if(n == 0) {
            return 1;
        }
        
        if(n == 1) {
            return x%MOD;
        }
        t = power(x, n / 2) % MOD;
        if(n % 2 == 0) {
            return t * t % MOD;
        }else{
            return t%MOD * t%MOD * x % MOD;
        }
    }

int main(){
  ios::sync_with_stdio(false);
  cin.tie(0);

  int n;
  cin >> n;
  
  ll cnt = 1;
  while(n >= cnt && 15 >= cnt){
    if(cnt %9 != 0)
    cout<< cnt%9;
    int c = cnt/9;
    while(c != 0){
      cout << 9;
      c--;
    }
    cout << endl;
    cnt++;
  }
  

  return 0;
}