#include <bits/stdc++.h>
using namespace std;
int main() {
  long long K;
  scanf("%lld", &K);
  long long ans = 0, p = 1, k;
  while (ans != K) {
    k = p + 1;
    long long a = 0, p1 = p, b = 0, k1 = k;
    while (p1) {
      a += p1 % 10;
      p1 /= 10;
    }
    while (k1) {
      b += k1 % 10;
      k1 /= 10;
    }
    if ((long long)p * b <= (long long)k * a) {
      int flag = 1;
      for (long long j = k + 1; j <= 100 + k; j++) {
        long long kk = j, kkk = j;
        b = 0;
        while (kk) {
          b += kk % 10;
          kk /= 10;
        }
        if ((long long)p * b > (long long)kkk * a) {
          flag = 0;
          break;
        }
      }
      if (flag) printf("%lld\n", p), ans++;
    }
    p++;
  }
}
