N=int(input()) A = list(range(0,3*N,3)) B = [] flg=1 for a in A: B.append(a+flg) flg = 1 if flg!=1 else -1 if N%2==1: B[-1] = A[-1] print(*A) print(*B)