import sys sys.setrecursionlimit(5*10**5) input = sys.stdin.readline from collections import defaultdict, deque, Counter from heapq import heappop, heappush from bisect import bisect_left, bisect_right from math import gcd n = int(input()) a = [] b = [i+1 for i in range(n)] c = [] for i in range(n): x,y = n+2*i+1, n+2*i+2 a.append(x) c.append(y) if n % 4 == 1 or n % 4 == 2: a[-1], c[-2] = c[-2], a[-1] g = (n*(n+1)//2 + 2*n - 1)//2 else: g = (n*(n+1)//2)//2 now = 0 for i in range(n)[::-1]: x,y = a[i],c[i] if abs(b[i]*(a[i]-c[i]))+now <= g: now += abs(b[i]*(a[i]-c[i])) a[i] = min(x,y) c[i] = max(x,y) else: a[i] = max(x,y) c[i] = min(x,y) ans = a+b+c print(*ans)