Problem:
Score: 400 points

Problem Statement

Print a sequence a_1, a_2, ..., a_N whose length is N that satisfies the following conditions:

a_i (1 \leq i \leq N) is a prime number at most 55 555.

The values of a_1, a_2, ..., a_N are all different.

In every choice of five different integers from a_1, a_2, ..., a_N, the sum of those integers is a composite number.

If there are multiple such sequences, printing any of them is accepted.

Notes

An integer N not less than 2 is called a prime number if it cannot be divided evenly by any integers except 1 and N, and called a composite number otherwise.

Constraints

N is an integer between 5 and 55 (inclusive).

Input

Input is given from Standard Input in the following format:

N

Output

Print N numbers a_1, a_2, a_3, ..., a_N in a line, with spaces in between.

Sample Input 1

5

Sample Output 1

3 5 7 11 31

Let us see if this output actually satisfies the conditions.

First, 3, 5, 7, 11 and 31 are all different, and all of them are prime numbers.

The only way to choose five among them is to choose all of them, whose sum is a_1+a_2+a_3+a_4+a_5=57, which is a composite number.

There are also other possible outputs, such as 2 3 5 7 13, 11 13 17 19 31 and 7 11 5 31 3.

Sample Input 2

6

Sample Output 2

2 3 5 7 11 13

2, 3, 5, 7, 11, 13 are all different prime numbers.

2+3+5+7+11=28 is a composite number.

2+3+5+7+13=30 is a composite number.

2+3+5+11+13=34 is a composite number.

2+3+7+11+13=36 is a composite number.

2+5+7+11+13=38 is a composite number.

3+5+7+11+13=39 is a composite number.

Thus, the sequence 2 3 5 7 11 13 satisfies the conditions.

Sample Input 3

8

Sample Output 3

2 5 7 13 19 37 67 79

Solution in Ruby (2.3.3) (judge verdict: Accepted)

p=[11, 31, 41, 61, 71, 101, 131, 151, 181, 191, 211, 241, 251, 271, 281, 311, 331, 401, 421, 431, 461, 491, 521, 541, 571, 601, 631, 641, 661, 691, 701, 751, 761, 811, 821, 881, 911, 941, 971, 991, 1021, 1031, 1051, 1061, 1091, 1151, 1171, 1181, 1201, 1231, 1291, 1301, 1321, 1361, 1381, 1451, 1471, 1481, 1511, 1531, 1571, 1601, 1621, 1721, 1741, 1801, 1811, 1831, 1861, 1871, 1901, 1931, 1951, 2011, 2081, 2111, 2131, 2141, 2161, 2221, 2251, 2281, 2311, 2341, 2351, 2371, 2381, 2411, 2441, 2521, 2531, 2551, 2591, 2621, 2671, 2711, 2731, 2741, 2791, 2801, 2851, 2861, 2971, 3001, 3011, 3041, 3061, 3121, 3181, 3191, 3221, 3251, 3271, 3301, 3331, 3361, 3371, 3391, 3461, 3491, 3511, 3541, 3571, 3581, 3631, 3671, 3691, 3701, 3761, 3821, 3851, 3881, 3911, 3931, 4001, 4021, 4051, 4091, 4111, 4201, 4211, 4231, 4241, 4261, 4271, 4391, 4421, 4441, 4451, 4481, 4561, 4591, 4621, 4651, 4691, 4721, 4751, 4801, 4831, 4861, 4871, 4931, 4951, 5011, 5021, 5051, 5081, 5101, 5171, 5231, 5261, 5281, 5351, 5381, 5431, 5441, 5471, 5501, 5521, 5531, 5581, 5591, 5641, 5651, 5701, 5711, 5741, 5791, 5801, 5821, 5851, 5861, 5881, 5981, 6011, 6091, 6101, 6121, 6131, 6151, 6211, 6221, 6271, 6301, 6311, 6361, 6421, 6451, 6481, 6491, 6521, 6551, 6571, 6581, 6661, 6691, 6701, 6761, 6781, 6791, 6841, 6871, 6911, 6961, 6971, 6991, 7001, 7121, 7151, 7211, 7321, 7331, 7351, 7411, 7451, 7481, 7541, 7561, 7591, 7621, 7681, 7691, 7741, 7841, 7901, 7951, 8011, 8081, 8101, 8111, 8161, 8171, 8191, 8221, 8231, 8291, 8311, 8431, 8461, 8501, 8521, 8581, 8641, 8681, 8731, 8741, 8761, 8821, 8831, 8861, 8941, 8951, 8971, 9001, 9011, 9041, 9091, 9151, 9161, 9181, 9221, 9241, 9281, 9311, 9341, 9371, 9391, 9421, 9431, 9461, 9491, 9511, 9521, 9551, 9601, 9631, 9661, 9721, 9781, 9791, 9811, 9851, 9871, 9901, 9931, 9941]
n=gets.to_i
for k in 0...n-1
print("#{p[k]} ")
end
print("#{p[n]}")