import std.stdio;
import std.range;
import std.array;
import std.string;
import std.conv;
import std.typecons;
import std.algorithm;
import std.container;
import std.typecons;
import std.random;
import std.csv;
import std.regex;
import std.math;
import core.time;
import std.ascii;
import std.digest.sha;

long gcd(long a, long b) {
	if (b == 0) {
		return a;
	}
	return gcd(b, a % b);
}

bool check(int[] _ans)
{
	long[] ans = _ans.map!(to!long).array;
	long sum = ans.sum;
	foreach (v; ans) {
		long sub = sum - v;
		if (gcd(v, sub) == 1) {
			// writeln(v, " ", sub, " ", gcd(v, sub));
			return false;
		}
	}
	long sub = ans[0];
	foreach (v; ans[1..$]) {
		sub = gcd(v, sub);
	}
	return sub == 1;
}

void main()
{
	int[] primes = [2];
	for (int i = 3; i <= 30000; ++i) {
		bool yes = true;
		foreach (v; primes) {
			yes &= i % v != 0;
		}
		if (yes) {
			primes ~= i;
		}
	}
	int n = readln.chomp.to!int;
	int[] arr = [2, 3, 4];
	int[] brr = [];
	for (int i = 6; i <= 30000; i += 2) {
		brr ~= i;
	}
	for (int i = 6; i <= 30000; i += 3) {
		brr ~= i;
	}
	std.algorithm.sort = brr;
	brr = std.algorithm.uniq(brr).array;
	int[] ans = arr ~ brr[0..n-3];
	bool[int] done;
	foreach (v; ans[0..$-1]) {
		done[v] = true;
	}
	int index = 2;
	while (true) {
		int ite = primes[index];
		bool flag = false;
		while (true) {
			if (ite in done) {
				ite += primes[index];
				continue;
			}
			ans[$-1] = ite;
			ite += primes[index];
			if (ans.check) {
				flag = true;
				break;
			}
			if (ite > 30000) {
				break;
			}
		}
		if (flag) {
			break;
		}
		index++;
	}
	foreach (i, v; ans) {
		if (i) write = " ";
		v.write;
	}
	writeln;
}
