You have array a that contains all integers from 1 to n twice. You can arbitrary permute any numbers in a.

Let number i be in positions x_{i}, y_{i} (x_{i} < y_{i}) in the permuted array a. Let's define the value d_{i} = y_{i} - x_{i} — the distance between the positions of the number i. Permute the numbers in array a to minimize the value of the sum $s = \sum_{i = 1}^{n}(n - i) \cdot|d_{i} + i - n$.


-----Input-----

The only line contains integer n (1 ≤ n ≤ 5·10^5).


-----Output-----

Print 2n integers — the permuted array a that minimizes the value of the sum s.


-----Examples-----
Input
2

Output
1 1 2 2

Input
1

Output
1 1

Difficulty: HARD

Solutions:
import sys
import math

def read_line():
	return sys.stdin.readline()[:-1]

def read_int():
	return int(sys.stdin.readline())

def read_int_line():
	return [int(v) for v in sys.stdin.readline().split()]

def read_float_line():
	return [float(v) for v in sys.stdin.readline().split()]
n = read_int()
x1 = 0
y1 = n
ans = [0] * (2 * n)
for i in range(1, n + 1):
	if i & 1:
		ans[x1] = i
		ans[x1 + n - i] = i
		x1 += 1
	else:
		ans[y1] = i
		ans[y1 + n - i] = i
		y1 += 1
for i in range(2 * n):
	if ans[i] == 0:
		ans[i] = n
print(*ans)


from sys import stdin, stdout, setrecursionlimit
input = stdin.readline
inf = float('inf')
from functools import cmp_to_key
from collections import defaultdict as dd
from collections import Counter, deque
from heapq import *
import math
from math import floor, ceil, sqrt

def geti():
	return map(int, input().strip().split())

def getl():
	return list(map(int, input().strip().split()))

def getis():
	return map(str, input().strip().split())

def getls():
	return list(map(str, input().strip().split()))

def gets():
	return input().strip()

def geta():
	return int(input())

def print_s(s):
	stdout.write(s + '\n')
from itertools import permutations as perm

def calc(a):
	cost = 0
	index = dd(list)
	n = len(a)
	for i in range(n):
		index[a[i]].append(i)
	n //= 2
	for i in range(1, n + 1):
		d = index[i][1] - index[i][0]
		cost += (n - i) * abs(d + i - n)
	return cost

def solve():
	n = geta()
	diff = n - 1
	ans = [0] * (2 * n)
	index = 0
	for i in range(1, n, 2):
		ans[index] = i
		ans[index + diff] = i
		diff -= 2
		while index < 2 * n and ans[index]:
			index += 1
		if index == 2 * n:
			break
	index = n
	diff = n - 2
	for i in range(2, n, 2):
		ans[index] = i
		ans[index + diff] = i
		diff -= 2
		while index < 2 * n and ans[index]:
			index += 1
	for i in range(2 * n):
		if not ans[i]:
			ans[i] = n
	print(*ans)
solve()


N = int(input())
ans = [N for i in range(2 * N)]
for i in range(1, N + 1):
	x = i // 2 if i & 1 else N - 1 + i // 2
	y = x + N - i
	(ans[x], ans[y]) = (i, i)
print(*ans)


import collections
import math
n = int(input())
arr = [0] * (2 * n)
(l, r) = (0, 0)
for i in range(1, n):
	if i % 2 == 1:
		arr[l] = arr[l + n - i] = i
		l += 1
	else:
		arr[n + r] = arr[n + r + n - i] = i
		r += 1
for i in range(2):
	while arr[l]:
		l += 1
	arr[l] = n
print(' '.join((str(x) for x in arr)))


n = int(input())
A = [i for i in range(1, n + 1, 2)]
B = [i for i in range(n - 2 if n % 2 else n - 1, 0, -2)]
C = [i for i in range(2, n + 1, 2)]
D = [i for i in range(n - 1 if n % 2 else n - 2, 0, -2)]
ans = ' '.join(map(str, A + B + C + D + [n]))
print(ans)


n = int(input())
A = [0] * (2 * n)
per1 = 0
per2 = n
for i in range(1, n):
	if i % 2 == 1:
		A[per1] = i
		A[per1 + n - i] = i
		per1 += 1
	else:
		A[per2] = i
		A[per2 + n - i] = i
		per2 += 1
A[-1] = n
if n % 2 == 1:
	A[n // 2] = n
else:
	A[-(n // 2 + 1)] = n
print(' '.join(map(str, A)))