from collections import defaultdict n = int(input()) if n == 1: print(-1) exit(0) a2 = [1, 4] b2 = [3, 6] c2 = [5, 2] a3 = [1, 2, 9] b3 = [6, 8, 7] c3 = [3, 4, 5] a4 = [1, 2, 4, 11] b4 = [7, 9, 10, 12] c4 = [8, 5, 6, 3] if n % 3 == 2: a = a2.copy() b = b2.copy() c = c2.copy() elif n % 3 == 0: a = a3.copy() b = b3.copy() c = c3.copy() else: a = a4.copy() b = b4.copy() c = c4.copy() l = len(a) while l < n: for x in a3: a.append(x + 3 * l) for x in b3: b.append(x + 3 * l) for x in c3: c.append(x + 3 * l) l += 3 print(*(a + b + c))