// D - Five, Five Everywhere
#include <bits/stdc++.h>
using namespace std;

bool isprime(int p){
	if(p <= 1) return false;
	for(int i=2; i*i<=p; ++i) if(p%i == 0) return false;
	return true;
}

int main(){
	int N; cin>>N;
	for(int n=0,p=11; p<=55555 && n<N; p+=10)
		if(isprime(p) && p%5==1){ cout<<p<<" "; n++; }
}