#include <cstdio>
#include <iostream>
#include <vector>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <utility>
#include <memory.h>
#include <algorithm>
#include <cassert>
#include <numeric>

#define forn(i, n) for (int i = 0; i < int(n); ++i)
#define ford(i, n) for (int i = int(n) - 1; i >= 0; --i)
#define all(c) (c).begin(), (c).end()
#define sz(c) int((c).size())
#define mp(x, y) make_pair(x, y)
#define pb(x) push_back(x)
#define fst first
#define snd second

using namespace std;

using ll = long long;
using vi = vector<int>;
using vll = vector<ll>;
using vvi = vector<vi>;

#define FNAME "a"

#ifdef LOCAL
#define eprintf(args...) fprintf(stderr, args), fflush(stderr);
#else
#define eprintf(args...) ;
#endif

int n;

bool read() {
    if  (!(cin >> n)) {
        return 0;
    }
    return 1;
}

ll gcd(ll a, ll b) {
    return b ? gcd(b, a % b) : a;
}

const int MAX = 30000;

bool check(vi a) {
    int old = sz(a);

    sort(all(a));
    a.resize(unique(all(a)) - a.begin());

    if  (sz(a) != old) {
        eprintf("found some same elements\n");
        return 0;
    }

    ll S = accumulate(all(a), 0ll);
    forn(i, n) {
        if  (a[i] > MAX) {
            eprintf("too big\n");
            return 0;
        }
        if  (gcd(a[i], S) == 1) {
            eprintf("a[i]=%d, S=%lld, gcd=%lld\n", a[i], S, gcd(S, a[i]));
            return 0;
        }
    }
    ll g = a[0];
    forn(i, sz(a)) {
        g = gcd(g, a[i]);
    }
    if  (g != 1) {
        eprintf("whole g=%lld\n", g);
        return 0;
    }
    return 1;
}


vi old_solve() {
    if  (n == 3) {
        return {2, 5, 63};
    }

    vi cands;
    for (int i = 1; i <= MAX / 2; ++i) {
        cands.pb(i);
    }

    while (1) {
        random_shuffle(all(cands));
        vi as{cands.begin(), cands.begin() + (n - 2)};

        sort(all(as));
        assert(unique(all(as)) - as.begin() == sz(as));

        ll sum = accumulate(all(as), 0ll);
        eprintf("sum = %lld\n", sum);
        int p = 4;
        for (; (p % 2 == 0 || p % 3 == 0 || sum % p != 0) && p < sum; ++p) {}
        if  (sum == p || 3 * p > MAX) {
            eprintf("bad sum, go on\n");
            continue;
        }

        assert(p % 2 != 0);
        assert(p % 3 != 0);

        eprintf("found prime = %d\n", p);

        vi ans;
        ans.pb(p);
        ans.pb(3 * p);
        for (int a : as) {
            ans.pb(2 * a);
        }

        assert(check(ans));

        return ans;

        break;
    }

    return {};
}

vi solve2() {
    if  (n <= 10000) {
        return old_solve();
    }

    vi vals;
    for (int i = 4; i <= MAX; ++i) {
        if  (i % 2 == 0 || i % 3 == 0) {
            vals.pb(i);
        }
    }

    while (1) {
        random_shuffle(all(vals));

        vi a{vals.begin(), vals.begin() + (n - 2)};

        a.pb(2);
        a.pb(3);

        if  (!check(a)) {
            continue;
        }

        return a;
    }
}

int main() {
    cin.tie(0);
    ios_base::sync_with_stdio(false);

#ifdef LOCAL
    freopen(FNAME ".in", "r", stdin);
    freopen(FNAME ".out", "w", stdout);
#endif

//    for (n = 20000; n >= 3; --n) {
//        solve2();
//
//        eprintf("got for n=%d\n", n);
//    }
//    return 0;

    while (read()) {
        vi ans = solve2();

        for (int x : ans) {
            cout << x << " ";
        }
        cout << endl;
    }

    return 0;
}


Measured memory_bytes: 660