void main() {
  import std.stdio, std.string, std.conv, std.algorithm;

  long[] a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 19, 29, 39, 49, 59, 69, 79, 89, 99,
    199, 299, 399, 499, 599, 699, 799, 899, 999];
  int k;
  rd(k);
  for (int i = 2; a.length < k; i++) {
    long ends = 0, po = 1;
    foreach (_; 0 .. i) {
      ends *= 10;
      ends += 9;
      po *= 10;
    }
    foreach (j; 1 .. 10) {
      if (j < i) {
        foreach (l; 0 .. 10) {
          a ~= j * po * 10 + l * po + ends;
        }
      } else {
        a ~= j * po * 10 + 9 * po + ends;
      }
    }
  }
  writefln("%(%s\n%)", a[0 .. k]);
}

// 1?99
// 1?999, 2?999
// 1?9999, 2?9999, 3?9999

void rd(T...)(ref T x) {
  import std.stdio : readln;
  import std.string : split;
  import std.conv : to;

  auto l = readln.split;
  assert(l.length == x.length);
  foreach (i, ref e; x)
    e = l[i].to!(typeof(e));
}
