#include <bits/stdc++.h>
#define INF 0x3f3f3f3f
#define FOR(i,a,n) for(register int i=a; i<=n; ++i)
#define FDR(i,a,n) for(register int i=a; i>=n; --i)
#define mem(a) memset(a, 0, sizeof(a))
#define pb push_back()
typedef long long ll;
typedef unsigned long long ull;
using namespace std;
const int maxn = 100005;
const int MOD = 1000000009;
int prime[1000005];
int Mark[1000005];
void Prime(){
    int index = 0;
    for(int i = 2; i <= 1000000; i++)
    {
        if(Mark[i] == 0){
            prime[index++] = i;
        }
        for(int j = 0; j < index && prime[j] * i <= 1000000; j++)
        {
            Mark[i * prime[j]] = 1;
            if(i % prime[j] == 0){
                break;
            }
        }
    }
}
int main()
{
    ios::sync_with_stdio(false);
    Prime();
    int n;
    cin >> n;
    int i = 1;
    int cnt = 0;
    while(1)
    {
        if(prime[i]%5 == 1)
        {
            cout << prime[i] << ' ';
            cnt++;
        }
        if(cnt == n)break;
        i++;
    }
    return 0;
}
