import std.algorithm;
import std.array;
import std.conv;
import std.range;
import std.stdio;
import std.string;
import std.typecons;

bool isGood (int cur)
{
	return cur % 2 == 0 || cur % 3 == 0 || cur % 5 == 0;
}

int [] solve (int n)
{
	int [] res;
	int cur = 1;
	while (res.length < n - 2)
	{
		if (isGood (cur))
		{
			res ~= cur;
		}
		cur += 1;
	}
	auto s = sum (res);
	foreach (u; cur + 1..cur + 100)
	{
		if (isGood (u))
		{
			foreach (v; u + 1..u + 100)
			{
				if (isGood (v))
				{
					if ((u + v + s) % 30 == 0)
					{
						res ~= u;
						res ~= v;
						return res;
					}
				}
			}
		}
	}
	assert (false);
}

void main ()
{
	int n;
	while (readf (" %s", &n) > 0)
	{
		writefln ("%(%s %)", solve (n));
	}
}
