#include<iostream>
#include<algorithm>
#include <cstring>
using namespace std;
bool judge(int n)
{
    for (int i=2;i*i<=n;i++)
        if (n%i==0) return false;
        return true;
}
int main ()
{    int n;
     cin>>n;
    for (int i=11;;i=i+10)
    {
        if (judge(i))
        {
            cout<<i<<" ";
            n--;
        }
        if (n==0) {cout<<endl;break;}
    }
    return 0;
}
