x#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define llong long long
#define pb(a) push_back(a)
#define INF 999999999
using namespace std;
typedef pair<int, int> P;
typedef pair<llong, llong> LP;
typedef pair<int, P> PP;
typedef pair<llong, LP> LPP;

int dy[]={0, 0, 1, -1, 0};
int dx[]={1, -1, 0, 0, 0};

unsigned GetDigit(unsigned num){
    return to_string(num).length();
}

int GetSum(int N){
  string S=to_string(N);
  int Sum=0;
  for(auto itr=S.begin();itr!=S.end();++itr){
    Sum += *itr-'0';
  }
  return Sum;
}

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

  int K;
  cin >> K;

  int A[1000000];
  for(int i=1;;++i){
    if(K==0) break;
    int dig=GetDigit(i);
    int tnum=i/((int)pow(10,dig-1));
    if(i<10) cout << i << endl;
    else if(i%10==0) {
      A[i%10]=((((int)pow(10,dig-1))*(tnum+1)+9)/GetSum(((int)pow(10,dig-1))*(tnum+1)+9));
      if((i/GetSum(i))<A[i%10]) cout << i << endl;
    }
    else if(tnum==9){
      if((i/GetSum(i))<((((int)pow(10,dig))+9)/GetSum(((int)pow(10,dig))+9))) cout << i << endl;
    }
    else {
      if((i/GetSum(i))<A[i%10]) cout << i << endl;
    }
  }
}
