#include <bits/stdc++.h>
using namespace std;
long long int sumofdigit(long long int n) {
  long long int sum = 0;
  while (n > 0) {
    sum += (n % 10);
    n /= 10;
  }
  return sum;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int n = 1, i, z = 0, count = 0, k, sum, temp, flag;
  cin >> k;
  while (count != k) {
    sum = sumofdigit(n);
    temp = n / sum;
    z = 0;
    for (i = n + 1; i <= (n + 10000); i++) {
      flag = i / sumofdigit(i);
      if (temp > flag) {
        z = 1;
        break;
      }
    }
    if (z == 0) {
      cout << n << endl;
      count += 1;
    }
    n += 1;
  }
  return 0;
}
