import random as r
x=int(input())
maximum=255
len_array=r.randint(3,maximum)
while len_array%2==0:
len_array=r.randint(1,maximum)
array=[r.randint(0,maximum) for i in range(len_array)]
mid=len_array//2
array[mid]=x
for i in range(mid-1):
if array[i+1]<array[i]:
array[i+1],array[i]=array[i],array[i+1]
for i in range(mid+2,len(array)-1):
if array[i+1]<array[i]:
array[i+1],array[i]=array[i],array[i+1]
for i,z in zip(array,range(len(array))):
if (x-1)==i or x==i or (x+1)==i:
continue
elif i>(x-1) and z<mid+1 :
while array[z]>(x-1):
array[z]=r.randint(0,mid-1)
elif i<(x+1) and z>mid-1:
while array[z]<(x+1):
array[z]=r.randint(mid+1,maximum)
array[mid+1]=x+1
array[mid-1]=x-1
print(array)