N = int(input()) if N == 1: print(-1) if N % 4 == 0: P = [] Q = [] R = [] for i in range(N): if i % 4 == 0 or i % 4 == 3: P.append(3*i + 1) R.append(3*i + 2) else: P.append(3*i + 2) R.append(3*i + 1) Q.append(3*i + 3) elif N % 4 == 1: P = [1,4,7,8,14] Q = [3,6,12,13,15] R = [5,2,10,11,9] for i in range(5,N): j = i - 5 if j % 4 == 0 or j % 4 == 3: P.append(3*i + 1) R.append(3*i + 2) else: P.append(3*i + 2) R.append(3*i + 1) Q.append(3*i + 3) elif N % 4 == 2: P = [1,4] Q = [3,6] R = [5,2] for i in range(2,N): j = i - 2 if j % 4 == 0 or j % 4 == 3: P.append(3*i + 1) R.append(3*i + 2) else: P.append(3*i + 2) R.append(3*i + 1) Q.append(3*i + 3) else: P = [1,2,8] Q = [3,6,9] R = [7,5,4] for i in range(3,N): j = i - 3 if j % 4 == 0 or j % 4 == 3: P.append(3*i + 1) R.append(3*i + 2) else: P.append(3*i + 2) R.append(3*i + 1) Q.append(3*i + 3) ans = P + Q + R print(*ans)