import sys N = int(input()) if N == 1: print(1) exit() if N == 3 or N == 5: print(-1) exit() if N % 2 == 0: for i in range(2,N+1,2): print(i,end=' ') print() exit() n = N // 2 + 1 i = 0 for _ in range(n - 4): print(N - (2 * i + 1),end=' ') i += 1 print(2,4,6,3)