#include<bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < (int) (n); i++)
using namespace std;

int main(){
    int A[55] = {2, 7, 17, 37, 47,
                 67, 97, 107, 127, 137,
                 157, 167, 197, 227, 257,
                 277, 307, 317, 337, 347,
                 367, 397, 457, 467, 487,
                 547, 557, 577, 587, 607,
                 617, 647, 677, 727, 757,
                 787, 797, 827, 857, 877,
                 887, 937, 947, 967, 977,
                 997, 1087, 1097, 1117, 1187,
                 1217, 1237, 1277, 1297, 1307,
    };
    int N;
    cin >> N;
    rep(i, N){
        if(i) cout << " ";
        cout << A[i];
    }
    cout << endl;
    return 0;
}
#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
int main(){
  int n; cin >> n;
  vector<int> sosu, ans;
  int cnt = 0;
  for(int i = 2; i <= 555555; i++){
    int j;
    for(j = 0; j < sosu.size(); j++){
      if(i % sosu[j] == 0){
        break;
      }
    }
    if(j == sosu.size()){
      sosu.push_back(i);
      if(i % 5 == 1){
        ans.push_back(i);
        cnt++;
        if(cnt == n){
          break;
        }
      }
    }
  }

  rep(i, n){
    if(i == 0) cout << ans[i];
    else cout << " " << ans[i];
  }
  cout << endl;
  return 0;
}
