#include <bits/stdc++.h>
using namespace std;
int cal(int n) {
  int i, a, s;
  a = n;
  s = 0;
  do {
    i = a % 10;
    s += i;
    a = a / 10;
  } while (a > 0);
  return (n / s);
}
int main() {
  int K, i, count;
  cin >> K;
  count = 1;
  while (count <= K) {
    i = count + 1;
    while (cal(i) < cal(count)) {
      i++;
    }
    cout << i - 1 << "\n";
    count++;
  }
  return 0;
}
