def solve(N): A = list(range(3,3*N+1,3)) B = [] th = (N+1)//3 if N%3!=2: for i,a in enumerate(A): B.append(a+(-2 if ith: B.append(a+1) elif i==th: B.append(a+2) else: B.append(a-2) print(*A) print(*B) N=int(input()) solve(N)