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;
}


void main()
{
  long N;
  readf("%d\n", &N);
  int[] ps = furui(55555);
  long[] vs = [];
  long i = 3;
  for (;vs.length != N;i+=2) {
    if (ps[i] == 1 && i%5 == 1) {
      vs ~= i;
    }
  }
  vs.map!(to!string).join(" ").writeln();

}
