#include <bits/stdc++.h>
int s(long n) {
  int m = 0;
  for (int i = 0; n > 0; i++) {
    m += n % 10;
    n /= 10;
  }
  return m;
}
long n;
int a[30000];
int main() {
  scanf("%ld", &n);
  int m = 0;
  for (int i = 1; i < n; i++) {
    if (i / s(i) <= n / s(n)) {
      m++;
      a[m - 1] = i;
    }
  }
  for (int i = 0; i < m; i++) printf("%d\n", a[i]);
}
