#include<bits/stdc++.h>
using namespace std;
int n;
long long x=1;
bool Tsuki(int a){
if(a==1){
return 0;
}
for(int i=2;i<=sqrt(a);i++){
if(a%i==0){
return 0;
}
}
return 1;
}
int main(){
ios::sync_with_stdio(false);
cin>>n;
for(int i=1;i<n;i++){
x*=10;
}
for(int i=x*2;i<x*10;i++){
int q=i;
bool l=0;
while(q!=0){
if(Tsuki(q)==0){
l=1;
break;
}
q/=10;
}
if(l==1){
continue;
}
cout<<i<<endl;
}
return 0;
}