#include <iostream>
#include <math.h>
using namespace std;

bool IsPrime(int x){
    if(x==2)return true;
    if(x%2==0)return false;
    for(int i=3;i<=sqrt(x);i+=2){
        if(x%i==0)return false;
    }
    return true;
}

int n;
int main(){
    cin>>n;
    int x=0;
    for(int i=2;x<n;i+=5){
        if(IsPrime(i)){
            if(x)cout<<" ";
            cout<<i;
            x++;
        }
    }
}