#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
const ll INF=1001001001001001;

struct Sieve {
  int n;
  vector<int> f, primes;
  Sieve(int n=1):n(n), f(n+1) {
    f[0] = f[1] = -1;
    for (ll i = 2; i <= n; ++i) {
      if (f[i]) continue;
      primes.push_back(i);
      f[i] = i;
      for (ll j = i*i; j <= n; j += i) {
        if (!f[j]) f[j] = i;
      }
    }
  }
  bool isPrime(int x) { return f[x] == x;}
  vector<int> factorList(int x) {
    vector<int> res;
    while (x != 1) {
      res.push_back(f[x]);
      x /= f[x];
    }
    return res;
  }
  vector<P> factor(int x) {
    vector<int> fl = factorList(x);
    if (fl.size() == 0) return {};
    vector<P> res(1, P(fl[0], 0));
    for (int p : fl) {
      if (res.back().first == p) {
        res.back().second++;
      } else {
        res.emplace_back(p, 1);
      }
    }
    return res;
  }
};



int main() {
  ll n;
  cin>>n;
  Sieve sv(55555);
  vector<int> v;
  v=sv.primes;
  ll now=0;
  vector<ll>A;
  rep(i,v.size()){
    if (v[i]%10==1) {
      now++;
      A.push_back(v[i]);
    }
  }
  rep(i,n){
    cout<<A[i]<<' ';
  }
}

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < (int)(n); i++)
#define repr(i,n) for(int i = (int)(n); i >= 0; i--)
#define all(v) v.begin(),v.end()
typedef long long ll;

int main(){
    int N;
    cin >> N;
    vector<bool> vec(55555);
    vec[1] = false;
    for (int i = 2; i <= 55554; i++){
        vec[i] = true;
    }
    for(int i = 2; i <= 55554; i++){
        if (vec[i]){
            for (int j = 2; j * i <= 55554; j++){
                vec[i * j] = false;
            }
        }
    }
    vector<int> ans(0);
    for (int i = 1; i <= 55551; i += 5){
        if (vec[i]) ans.push_back(i);
    }
    rep(i,N){
        cout << ans[i] << " ";
    }
    cout << endl;
}