import std.stdio, std.algorithm, std.string, std.conv, std.array, std.range, std.math;
int readint() { return readln.chomp.to!int; }
int[] readints() { return readln.split.to!(int[]); }

bool is_prime(int x) {
    for (int i=2; i*i<=x; i++) if(x % i == 0) return false;
    return x != 1;
}

int[] make_primes() {
    int[] a;
    foreach(i; 5..55555+1) if(is_prime(i)) a ~= i;
    return a;
}

void main() {
    int n = readint();
    int[] primes = make_primes();
    int[] ans;
    foreach (int p ; primes) {
        if (p % 5 == 1) ans ~= p;
        if (ans.length == n) break;
    }
    writefln("%(%s %)", ans);
    string _ = readln;
}