N = int(input()) A = [3 * i for i in range(N)] B = [3 * i + 1 for i in range(N)] diff = sum(B) - sum(A) if diff % 3 == 0: A[-1] += diff elif diff % 3 == 1: A[-1] += diff elif diff % 3 == 2: A[-1] += 1 B[-1] -= diff - 1 A.sort() B.sort() print(*A) print(*B)