Nagase is a top student in high school. One day, she's analyzing some properties of special sets of positive integers.  She thinks that a set S = \\{a_{1}, a_{2}, ..., a_{N}\\} of **distinct** positive integers is called **special** if for all 1 \leq i \leq N, the gcd (greatest common divisor) of a_{i} and the sum of the remaining elements of S is **not** 1.  Nagase wants to find a **special** set of size N. However, this task is too easy, so she decided to ramp up the difficulty. Nagase challenges you to find a **special** set of size N such that the gcd of all elements are 1 and the elements of the set does not exceed 30000.
from random import sample
n=int(input())
if n==3:a=[2,3,63]
else:
  l=[i for i in range(6,30001)if i%2==0 or i%3==0]
  while True:
    a=[2,3,4];a+=sample(l,n-3)
    if sum(a)%6==0:break
print(*a)
from random import sample
n=int(input())
if n==3:a=[2,5,63]
else:
  l=[i for i in range(6,30001)if i%2==0 or i%3==0]
  while True:
    a=[2,3,4];a+=sample(l,n-3)
    if sum(a)%6==0:break
print(*a)