import std.stdio, std.range,std.array, std.algorithm, std.algorithm, std.conv;

int[] furui(long max)
{
  int[] vs = 1.repeat().take(max).array;
  vs[0] = 0; vs[1] = 0;
  for (long i = 3; i < max; i+=2) {
    if (vs[i] == 0) {
      continue;
    }
    long j = i+i;
    while (j < max) {
      vs[j] = 0;
      j += i;
    }
  }
  return vs;
}

bool is_ok(int[] ps, long n) {
  if (ps.length > n) {
    return ps[n] == 0;
  }
  for (long i = 2; i*i <= n; i++) {
    if (n%i == 0) { return true; }
  }
  return false;
}

void main()
{
  long N;
  readf("%d\n", &N);
  int[] ps = furui(55555);
  long[] vs = [2];
  long i = 3;
  for (;vs.length != 5;i+=2) {
    if (ps[i] == 1) {
      vs ~= i;
    }
  }
  long S = vs.sum();
  for (;vs.length != N; i+=2) {
    if (ps[i] == 0) {
      continue;
    }
    bool flag = true;
    foreach (v; vs) {
      if (!is_ok(ps, S-v+i)) {
        flag = false;
        break;
      }
    }
    if (flag) {
      vs ~= i;
      S += i;
    }
  }

  vs.map!(to!string).join(" ").writeln();

}
