#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdio>
using namespace std;

int main()
{
    long long int k;
    cin >> k;
    vector<pair<long double, long long int>> nusuke_key;

    while (k > 0)
    {
        ketasuu++;
        k /= 10;
    }

    for (int i = 1; i <= 9; i++)
    {
        nusuke_key.push_back(make_pair(1.0, i));
    }

    double pow_tmp = pow(10, ketasuu + 1);
    for (long long int i = 10; i <= (int)pow_tmp - 1; i++)
    {
        long long int tmp = i;
        int sum = 0;
        while (tmp > 0)
        {
            sum += tmp % 10;
            tmp /= 10;
        }

        nusuke_key.push_back(make_pair((long double)i / (long double)sum, i));
    }

    sort(nusuke_key.begin(), nusuke_key.end());
    for (int i = 0; i < k; i++)
    {
        printf("%lld\n", nusuke_key[i].second);
    }

    return 0;
}