#include "bits/stdc++.h"
using namespace std;

#define ffor(n) for(int i = 0; i < n; i++)
#define fffor(n) for(int j = 0; j < n; j++)
#define uwu ios::sync_with_stdio(false);cin.tie(NULL);
#pragma GCC optimize("Ofast")

const int INF = 1e9 + 7;
const long long INF2 = 1e17;

int main(void) {
	uwu
	
	set <int> s;
	for(int i = 6; i <= 10000; i += 6) s.insert(i);
	for(int i = 10; i <= 10000; i += 10) s.insert(i);
	for(int i = 15; i <= 10000; i += 15) s.insert(i);
	
	vector <int> v;
	for(auto x: s) v.push_back(x);
	swap(v[2], v[3]);
	
	int n; cin >> n;
	ffor(n) cout << v[i] << ' ';
	cout << '\n';
}
/*
C:\Users\kenne\OneDrive\Desktop\competitive_programming\main.cpp
*/

#include <iostream>
#include <cstdio>
#include <fstream>
#include <algorithm>
#include <cmath>
#include <deque>
#include <vector>
#include <queue>
#include <string>
#include <cstring>
#include <map>
#include <stack>
#include <set>
#include <bits/stdc++.h>
using namespace std;

#define lson 2*i  
#define rson 2*i+1  
#define LS l,mid,lson  
#define RS mid+1,r,rson  
#define UP(i,x,y) for(i=x;i<=y;i++)  
#define DOWN(i,x,y) for(i=x;i>=y;i--)  
#define MEM(a,x) memset(a,x,sizeof(a))  
#define W(a) while(a)  
#define gcd(a,b) __gcd(a,b)  
#define ll long long  
#define MAX 1000005  
#define MOD 1000000007  
#define INF 0x3f3f3f3f  
#define EXP 1e-8  
#define lowbit(x) (x&-x)  
ll gcd(ll p,ll q){return q==0?p:gcd(q,p%q);}
ll qpow(ll p,ll q){ll f=1;while(q){if(q&1)f=f*p;p=p*p;q>>=1;}return f;}

const int PRIMERANGE = 1000000;
int prime[PRIMERANGE + 1];
int getPrime()
{
    memset (prime, 0, sizeof (int) * (PRIMERANGE + 1));
    for (int i = 2; i <= PRIMERANGE; i++)
    {
        if (!prime[i]) prime[++prime[0]] = i;
        for (int j = 1; j <= prime[0] && prime[j] <= PRIMERANGE / i; j++)
        {
            prime[prime[j]*i] = 1;
            if (i % prime[j] == 0) break;
        }
    }
    return prime[0];
}

int main () {
    ll n; cin >> n;
    // getPrime();
    // vector<ll> ans;
    // ans.push_back(30);
    vector<ll> base;
    unordered_map<int, int> hash;
    int i = 15;
    base.push_back(15); hash[15] = 1;
    base.push_back(10); hash[10] = 1;
    base.push_back(6);  hash[6] = 1;
    while (i < 10000) {
        if (!hash[i]) 
            base.push_back(i);hash[i] = 1;  
        i += 15;
    }
    i = 10;
    while (i < 10000) {
        if (!hash[i]) 
            base.push_back(i);hash[i] = 1;  
        i += 10;
    }
    i = 6;
    while (i < 10000) {
        if (!hash[i]) 
            base.push_back(i);hash[i] = 1;  
        i += 6;
    }
    for (int i = 0; i < n; ++i) cout << base[i] << ' ';
    cout << endl;
    return 0;
}