import std.algorithm;
import std.array;
import std.conv;
import std.numeric;
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 - 3)
	{
		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))
                {
			foreach (w; v + 1..v + 100) if (isGood (w))
			{
				if ((u + v + w + s) % 30 == 0 &&
				    gcd (gcd (u, v), w) == 1)
				{
					res ~= u;
					res ~= v;
					res ~= w;
					return res;
				}
			}
		}
	}
	assert (false);
}

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