N = int(input()) A = [] B = [] if N % 2 == 1: A.append(0) B.append(0) N -= 1 N //= 2 for i in range(N): A.append(i * 6 + 3) A.append(i * 6 + 8) B.append(i * 6 + 4) B.append(i * 6 + 7) for i in A: print(i,end = " ") print() for i in B: print(i,end = " ") print()