N = int(input()) if N == 1: exit(print(-1)) 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] 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 print(*ans)