# from itertools import permutations def check(N, P): Q = list(sorted(P)) if Q != list(range(1, 3 * N + 1)): print("ERROR:", N) return l, r = 0, 0 for i in range(N): l += P[i] * P[i + N] r += P[i + N] * P[i + 2 * N] if l != r: print("ERROR:", N) return def solve(N): if N == 1: ans = [-1] return ans a, b, c = [], [], [] s = 0 if N % 3 == 1: a, b, c = [1, 2, 4, 11], [7, 9, 10, 12], [8, 5, 6, 3] s = 12 elif N % 3 == 2: a, b, c = [1, 4], [3, 6], [5, 2] s = 6 else: a, b, c = [1, 2, 9], [6, 8, 7], [3, 4, 5] s = 9 while len(a) < N: a.append(s + 1) a.append(s + 2) a.append(s + 9) b.append(s + 6) b.append(s + 8) b.append(s + 7) c.append(s + 3) c.append(s + 4) c.append(s + 5) s += 9 ans = a + b + c return ans N = int(input()) print(*solve(N))