You are given a problem to find the smallest "Snuke numbers." These are defined as integers where, for all positive integers m greater than n, the ratio of n to the sum of its digits is less than or equal to the ratio of m to the sum of its digits. Your task is to list the K smallest Snuke numbers, where K is an input integer. The constraints are that K is at least 1 and the K-th smallest Snuke number is not greater than 10^15. The input is given in the format of a single integer K, and the output should be K lines, each containing the corresponding smallest Snuke number. For example, given an input of 10, the output should be the first 10 smallest Snuke numbers.

# Buggy version:
k=input()
a=0
b=1
for i in range(k):
  a+=b
  print(a)
  if b<(a+b)/sum(map(int,str(a+b))):
    b*=10

# Fixed version:
k=int(input())
a=0
b=1
for i in range(k):
  a+=b
  print(a)
  if b<(a+b)/sum(map(int,str(a+b))):
    b*=10

# Buggy version:
m=float("INF")
sunukes=[]
for i in range(2,-1,-1):
    for j in range(100,10,-1):
        #print(i,j)
        sunuke=j*(10**i)-1
        s=str(sunuke)
        sn=0
        for k in range(len(s)):
            sn+=int(s[k])
        x=sunuke/sn
        #print(sn,x,i,j,j*10**i-1)
        if x<=m :
            m=x
            sunukes.append(sunuke)
for i in range(9,0,-1):
    sunukes.append(i)
k=int(input())
#print(sunukes)
print(sunukes[-k])


# Fixed version:
m=float("INF")
sunukes=[]
for i in range(7,-1,-1):
    for j in range(1000,10,-1):
        #print(i,j)
        sunuke=j*(100**i)-1
        s=str(sunuke)
        sn=0
        for k in range(len(s)):
            sn+=int(s[k])
        x=sunuke/sn
        #print(sunuke,x)
        if x<=m :
            m=x
            sunukes.append(sunuke)
for i in range(9,0,-1):
    sunukes.append(i)
sunukes=sunukes[::-1]
k=int(input())
#print(sunukes)
for i in range(k):
    print(sunukes[i])

# Buggy version:
#D問題
K = int(input())
keta = 1
now = 1
def sunuke(n):
    a = 0
    for i in str(n):
        a+=int(i)
    return(n/a)
count=0
while count < k:
    if sunuke(ima) <= sunuke(ima+keta):
        print(ima)
        ima += keta
        count += 1
    else:
        ima += 9*keta
        keta *= 10



# Fixed version:
#D問題
K=int(input())
keta=1
now=1
count=0

def sunuke(n):
    a=0
    for i in str(n):
        a+=int(i)
    return(n/a)

while count < K:
    if sunuke(now) <= sunuke(now+keta):
        print(now)
        now+=keta
        count+=1
    else:
        now+=9*keta
        keta*=10

# Buggy version:
k = int(input())

def func(a):
    s = 0
    for i in str(a):
        s += int(i)
    return a/s

candidate_lst = []
for i in range(18):
    for j in range(1, 150):
         candidate_lst.append(int(str(j) + '9' * i))
candidate_lst = sorted(candidate_lst)

count = 0
index = -1
snuke = 1
while count < k:
    min_snuke = 10**100
    for m, i in enumerate(candidate_lst[index+1:]):
        if i > 100*snuke:
            break
        po_snuke = func(i)
        if min_snuke > po_snuke:
            min_snuke = po_snuke
            next_snuke = i
            next_index = m
    print(next_snuke)
    snuke = next_snuke
    index = index + next_index + 2
    count += 1          

# Fixed version:
k = int(input())

def func(a):
    s = 0
    for i in str(a):
        s += int(i)
    return a/s

candidate_lst = []
for i in range(18):
    for j in range(1, 150):
         candidate_lst.append(int(str(j) + '9' * i))
candidate_lst = sorted(list(set(candidate_lst)))

count = 0
index = -1
snuke = 1
while count < k:
    min_snuke = 10**100
    for m, i in enumerate(candidate_lst[index+1:]):
        if i > 100*snuke:
            break
        po_snuke = func(i)
        if min_snuke > po_snuke:
            min_snuke = po_snuke
            next_snuke = i
            next_index = m
    print(next_snuke)
    snuke = next_snuke
    index = index + next_index + 1
    count += 1

# Buggy version:
import sys

def S(n):
  return n / sum(map(int, str(n)))


def f(n):
  d = 0
  C = [n]
  while S(n) > (10**(d-1) / (9*d)):
    c = 10**(d+1) * (n // 10**(n+1) + 1) - 1
    C.append(c)
  
  Smin = float('inf')
  res = 0
  for c in C:
    if S(c) < Smin:
      res = c  
  return res
  
def main():
  input = sys.stdin.readline
  K = int(input())
  ans = 1
  while _ in range(K):
    print(ans)
    ans = f(ans+1)


if __name__ == '__main__':
  main()

# Fixed version:
import sys

def S(n):
  return n / sum(map(int, str(n)))


def f(n):
  d = 0
  C = [n]
  while S(n) > (10**d / 9*(d+1)):
    c = 10**(d+1) * (n // 10**(d+1) + 1) - 1
    C.append(c)
    d += 1
  Smin = float('inf')
  res = 0
  for c in C:
    if S(c) < Smin:
      Smin = S(c)
      res = c  
  return res


def main():
  input = sys.stdin.readline
  K = int(input())
  ans = 1
  for _ in range(K):
    print(ans)
    ans = f(ans+1)


if __name__ == '__main__':
  main()

# Buggy version:
from math import log10 as l
s=lambda f:sum(map(int,list(str(f))))
p=lambda a,j:(a//10**(j+1)+1)*10**(j+1)-1
n=int(input())
a=1
for i in range(n):
  print(a)
  if(a<10):
    a+=1
    continue
  a+=1
  k=[p(a,j) for j in range(int(l(a)))]
  o=[p(a,j)/s(p(a,j)) for j in range(int(l(a)))]
  a=k[o.index(min(o))]

# Fixed version:
from math import log10 as l
s=lambda f:sum(map(int,list(str(f))))
p=lambda a,j:(a//10**(j+1)+1)*10**(j+1)-1
n=int(input())
a=1
for i in range(n):
  print(a)
  if(a<9):
    a+=1
    continue
  a+=1
  k=[p(a,j) for j in range(int(l(a)))]
  o=[p(a,j)/s(p(a,j)) for j in range(int(l(a)))]
  a=k[o.index(min(o))]

# Buggy version:
import math
K=int(input())
k=0
m=0
def D(x):
  s=str(x)
  array=list(map(int,list(s)))
  return sum(array)
N=1
S=1
a=0
print(N)
while k<=K:
  N+=10**a
  S=D(N)
  if a<math.log10(N/S):
    a+=1
    N=(N//10**a+1)*10**a-1 
  S=D(N)
  print(N)
  k+=1
    
    


# Fixed version:
import math
K=int(input())
k=2
m=0
def D(x):
  s=str(x)
  array=list(map(int,list(s)))
  return sum(array)
N=1
S=1
a=0
print(1)
while k<=K:
  N+=10**a
  S=D(N)
  if a<math.log10(N/S):
    a+=1
    N=(N//10**a+1)*10**a-1
  S=D(N)
  print(N)
  k+=1

# Buggy version:
res = []
for digit in range(1,16):
    if digit<=3:
        for i in range(2,11):
            res.append(10**(digit-1)*i-1)
    elif 4<=digit<=12:
        for i in range(11,(digit-2)*10):
            res.append(i*10**(digit-2)-1)
        for i in range(digit-2,11):
            res.append(i*10**(digit-1)-1)
    elif digit==15:
        for i in range(101,110):
            res.append(i*10**(digit-3)-1)
        for i in range(11,101):
            res.append(i*10**(digit-2)-1)
    else:
        for i in range(11,101):
            res.append(i*10**(digit-2)-1)
print(res)


# Fixed version:
res = []
for digit in range(1,16):
    if digit<=3:
        for i in range(2,11):
            res.append(10**(digit-1)*i-1)
    elif 4<=digit<=12:
        for i in range(11,(digit-2)*10):
            res.append(i*10**(digit-2)-1)
        for i in range(digit-2,11):
            res.append(i*10**(digit-1)-1)
    elif digit==15:
        for i in range(101,110):
            res.append(i*10**(digit-3)-1)
        for i in range(11,101):
            res.append(i*10**(digit-2)-1)
    else:
        for i in range(11,101):
            res.append(i*10**(digit-2)-1)
for i in range(int(input())):
    print(res[i])

# Buggy version:
import sys 

K = int(input())

if K <= 0:
    sys.exit(0)

step = 1 
snuke = 1 

while K >= 0:
    if step < snuke/sum(map(int, str(snuke))):
        snuke += 9 * step
        step *= 10
    else:
        print(snuke)
        snuke += step
        K -= 1

# Fixed version:
import sys 

K = int(input())

if K <= 0:
    sys.exit(0)

step = 1 
snuke = 1 

while K > 0:
    if step < snuke/sum(map(int, str(snuke))):
        snuke += 9 * step
        step *= 10
    else:
        print(snuke)
        snuke += step
        K -= 1

# Buggy version:
MAX = 10**15+1

def find_next_n(n):
    cand = []
    n_str = str(n)
    n_list = list(n_str)
    for i in range(1,len(str(n))+1):
        n_list[-i] = '9'
        cand.append(int("".join(n_list)))
    cand_result = [num/snuke(num) for num in cand]
    min_idx = cand_result.index(min(cand_result))

    return cand[min_idx]
    
    
def snuke(num):
    ans = 0
    while num//10 != 0:
        ans += num%10
        num = num//10
    return ans + num

def main():
    K = int(input())
    if K<10:
        for i in range(1,K+1):
            print(i)
    else:
        n = 10
        for i in range(K):
            print(i)
        for i in range(10,K+1):
            ans = find_next_n(n)
            print(ans)
            n = ans+i
            
            if n>MAX:
                break
    
    
if __name__ == "__main__":
    main()

# Fixed version:
MAX = 10**15

def find_next_n(n):
    cand = []
    n_str = str(n)
    n_list = list(n_str)
    for i in range(1,len(str(n))+1):
        n_list[-i] = '9'
        cand.append(int("".join(n_list)))
    cand_result = [num/snuke(num) for num in cand]
    min_idx = cand_result.index(min(cand_result))

    return cand[min_idx]
    
    
def snuke(num):
    ans = 0
    while num//10 != 0:
        ans += num%10
        num = num//10
    return ans + num

def main():
    K = int(input())
    if K<10:
        for i in range(1,K+1):
            print(i)
    else:
        n = 10
        for i in range(1,n):
            print(i)
        for i in range(10,K+1):
            ans = find_next_n(n)
            print(ans)
            n = ans+1
            
            if n>MAX:
                break
    
    
if __name__ == "__main__":
    main()

# Buggy version:
# -*- coding: utf-8 -*-
# 
import math
import sys
import itertools
import numpy as np
from operator import itemgetter

k =int(input())
nmax=0
s = []
for i in range(1,200):
    for j in range(14):
        p = i
        for ii in range(j):
            p=p*10+9
        q = i // 100 + (i // 10) % 10 + i % 10 + 9*j
        r = p / q

        s.append((p,q,r))

s= sorted( s, key=itemgetter(2) )
print(s)
num=0
for a in s :
    if a[0] > nmax:
        nmax = a[0]
        print(nmax)
        num += 1
        if num >= k :
            break 
    


# Fixed version:
# -*- coding: utf-8 -*-
# 
import math
import sys
import itertools
import numpy as np
from operator import itemgetter

k =int(input())
nmax=0
s = []
for i in range(1,200):
    for j in range(14):
        p = i
        for ii in range(j):
            p=p*10+9
        q = i // 100 + (i // 10) % 10 + i % 10 + 9*j
        r = p / q

        s.append((p,q,r))

s= sorted( s, key=itemgetter(2) )
#print(s)
num=0
for a in s :
    if a[0] > nmax:
        nmax = a[0]
        print(nmax)
        num += 1
        if num >= k :
            break