#include <bits/stdc++.h>
long long pow_10(int x) {
  long long sub = 1;
  if (x == 0) {
    return 1;
  } else {
    while (x) {
      sub = sub * 10;
      x--;
    }
    return sub;
  }
}
int main() {
  std::vector<long long> sunuke;
  for (int i = 1; i < 10; i++) {
    sunuke.push_back(i);
  }
  long long sub = 0;
  long long subsub = 0;
  long long subsubsub = 0;
  for (int i = 1; i <= 15; i++) {
    sub = 0;
    subsub = i;
    while (subsub) {
      sub += 9 * pow_10(subsub - 1);
      subsub--;
    }
    subsubsub = sub;
    long long subsubsubsub;
    for (int j = 1; j <= 9; j++) {
      sub = subsubsub + j * pow_10(i);
      if (i == 1) {
        sunuke.push_back(sub);
      } else {
        subsubsubsub = sub;
        for (int q = 0; q < 10; q++) {
          sub = subsubsubsub - q * pow_10(i - 1);
          sunuke.push_back(sub);
        }
      }
    }
  }
  std::sort(sunuke.begin(), sunuke.end());
  std::vector<float> sunuke_S;
  long long sum;
  for (int i = 0; i < sunuke.size(); i++) {
    sum = 0;
    long long sunukes = sunuke[i];
    while (sunukes) {
      sum = sum + (sunukes % 10);
      sunukes = sunukes / 10;
    }
    sunuke_S.push_back((float)sunuke[i] / (float)sum);
  }
  int K;
  std::cin >> K;
  std::vector<long long> answer;
  for (int i = 0; i < sunuke.size(); i++) {
    for (int j = i; j < sunuke.size(); j++) {
      if (sunuke_S[i] <= sunuke_S[j]) {
      } else {
        break;
      }
      if (j == (sunuke.size() - 1)) {
        answer.push_back(sunuke[i]);
      }
    }
  }
  for (int i = 0; i < K; i++) {
    std::cout << answer[i] << std::endl;
  }
}
