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 b = b2 c = c2 elif n % 3 == 0: a = a3 b = b3 c = c3 else: a = a4 b = b4 c = c4 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))