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

#pragma GCC optimize(2)

#include<bits/stdc++.h>
#define mp			make_pair
#define rep(i,n)	for(int i=0;i<n;i++)
#define BINF		0x7fffffff
#define INF			0x3f3f3f3f
#define LINF		3223372036854775807
#define END(s)		{cout<<s;return 0;}
#define CON(s)		{cout<<s;continue;}
#define BRE(s)		{cout<<s;break;}
#define pb			push_back
#define int			long long
#define All(a)		a.begin(),a.end()  //with A in CAPITAL!!!
#define sz(a)		(int)a.size()
#define F			first
#define S			second
const bool debug=1;
const bool files=0;
using namespace std;
int base=1;
int now=0;

signed main(){
	ios::sync_with_stdio(false);
	if(files){
		freopen("input.txt","r",stdin);
		freopen("output.txt","w",stdout);
	}
	int n;
	cin>>n;
	rep(i,n){
		now+=base;
		if(now/(base*10)) now-=base,base*=10,now+=base;
		cout<<now<<endl;
	}
	return 0;
}