#include <bits/stdc++.h>
int main() {
  double checksunuke[16];
  checksunuke[0] = 1.0;
  ;
  int sunukebase = 19;
  int powb = 10;
  for (int cntx = 1; cntx < 16; cntx++) {
    int outbase = sunukebase;
    int ninput = sunukebase;
    int nbase = 0;
    while (ninput > 0) {
      nbase += ninput % 10;
      ninput = ninput / 10;
    }
    checksunuke[cntx] = (double)outbase / nbase;
    powb *= 10;
    sunukebase += powb;
  }
  int ninput = 0;
  int nbase = 0;
  std::cin >> ninput;
  int startint = 1;
  while (ninput > 0) {
    if (startint > 10e15) {
      std::cout << "err" << std::endl;
      break;
    }
    int outbase = startint;
    int ndd = startint;
    nbase = 0;
    int cnt = 0;
    while (ndd > 0) {
      nbase += ndd % 10;
      ndd = ndd / 10;
      cnt++;
    }
    float output_b = (float)outbase / nbase;
    if (checksunuke[cnt - 1] >= output_b) {
      std::cout << startint << std::endl;
      ninput--;
    }
    startint++;
  }
  return 0;
}
