#include <bits/stdc++.h>
using namespace std;
const int MAX = 55555;
int prime[MAX];
int used[MAX];
bool is_prime[MAX];
int k = 0;
int n;
int t = 0;
int ans[60];
void init() {
  for (int i = 2; i < MAX; i++) {
    if (is_prime[i] == 0) {
      prime[k++] = i;
    }
    for (int j = 0; j < k && prime[j] * i < MAX; j++) {
      is_prime[prime[j] * i] = 1;
      if (i % prime[j] == 0) break;
    }
  }
}
int main() {
  init();
  for (int i = 0; i < k; i++) {
    if (prime[i] % 10 == 7) ans[t++] = prime[i];
    if (t > 56) break;
  }
  cin >> n;
  for (int i = 0; i < n - 1; i++) cout << ans[i] << ' ';
  cout << ans[n - 1] << endl;
  return 0;
}
