#!/usr/bin/perl

my ($k) = map {$_ - 0} split(/\s+/o,<STDIN>);

my %chk = ();
for(my $i=1;$i<=9;$i++){
  $chk{'' . $i} = 1;
}

for(my $nk=1; $nk<15; $nk++){
  for(my $j = 1; $j<=99 ; $j++){
    my $cc = $j . ( '9' x $nk );
    $chk{$cc} = 1;
  }
}

my @chk = sort { $a <=> $b} map {$_ - 0} keys %chk;

my @s = ();
$#s = $#chk;
for(my $i=0;$i<=$#chk;$i++){
  my @a = split('',sprintf("%d",$chk[$i]));
  my $ss = 0;
  for(my $i=0;$i<=$#a;$i++){
    $ss += $a[$i];
  }
  $s[$i] = $ss;
}

my @r = ();
for(my $i=0;$i<$#chk;$i++){
  my $a = 1;
  for(my $j=$i+1;$j<=$#chk;$j++){
    if( $chk[$i] / $s[$i] > $chk[$j] / $s[$j] ){
      $a = undef;
      last;
    }
  }
  push(@r,$chk[$i]) if $a;
}

for(my $i=0;$i<$k;$i++){
  print "$r[$i]\n";
}

