#include <bits/stdc++.h>
using namespace std;
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[10000];
  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 (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)) < ((((int)pow(10, dig - 1)) * (tnum + 1) + 9) /
                             GetSum(((int)pow(10, dig - 1)) * (tnum + 1) + 9)))
        cout << i << endl;
    }
  }
}
