#include <bits/stdc++.h>
using namespace std;
using ull = unsigned long long int;
int main() {
  long k;
  long cnt = 1;
  long sum;
  cin >> k;
  string str;
  for (long long int i = 1; i < (long long int)(k + 1); i++) {
    bool flag = true;
    while (flag) {
      str = to_string(cnt);
      sum = 0;
      for (long long int j = 0; j < (long long int)(str.length()); j++) {
        sum += str[j] - '0';
      }
      if (sum == i) {
        cout << cnt << endl;
        flag = false;
      }
      cnt++;
    }
  }
  return 0;
}
