K = int(eval(input()))





def ns(n):

    return sum([int(c) for c in str(n)])





ans, base = 0, 1

for _ in range(K):

    ans += base

    print(ans)



    if (ans + base) / ns(ans + base) > (ans + 10 * base) / ns(ans + 10 * base):

        base *= 10
K = int(eval(input()))





def ns(n):

    ret, tmp = 0, n



    while tmp > 0:

        tmp, r = divmod(tmp, 10)

        ret += r



    return ret





ans, base = 0, 1

for _ in range(K):

    ans += base

    print(ans)



    if (ans + base) / ns(ans + base) > (ans + 10 * base) / ns(ans + 10 * base):

        base *= 10
K = int(eval(input()))


def ns(n):
    return sum([int(c) for c in str(n)])


ans, base = 0, 1
for _ in range(K):
    ans += base
    print(ans)
    if (ans + base) / ns(ans + base) > (ans + 10 * base) / ns(ans + 10 * base):
        base *= 10

K = int(eval(input()))


def ns(n):
    ret, tmp = 0, n
    while tmp > 0:
        tmp, r = divmod(tmp, 10)
        ret += r
    return ret


ans, base = 0, 1
for _ in range(K):
    ans += base
    print(ans)
    if (ans + base) / ns(ans + base) > (ans + 10 * base) / ns(ans + 10 * base):
        base *= 10

-    return sum([int(c) for c in str(n)]) +    ret, tmp = 0, n +    while tmp > 0: +        tmp, r = divmod(tmp, 10) +        ret += r +    return ret