#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
bitset<maxn> pr; 
int n;
void sieve(){
	pr.set();
	pr[0] = pr[1] = 0;
	for(int i = 2; i*i <= n; ++i){
		if(pr[i])
			for(int j = i*i; j <= n; j+=i) 
				pr[j] = 0;
	}
}
int main() {
	n = maxn - 5;
	sieve();
	cin >> n;
	for(int i = 2, cn = 0; cn < n; i++){
		if(pr[i] and i%5 == 1){
			cout << i << ' ';
			cn++;
		}
	}
	return 0;
}