#include<iostream>
using namespace std;

int check(int a){
	int i;
	for(i = 2; i < a && a%i != 0; i++){}
	if(i == a)
		return 1;
	else
		return 0;
}

int main(void){
	int n,i,j=2;
	cin >> n;
	for(i = 0; i < n; i++){
		while(!(check(j)) || j%5 != 1)
			j++;
		cout << j << " " <<"\n";
        j++;
	}
	cout << "\n";
}