N = int(input()) A = [] if N==1: A = [1] elif N==3 or N==5: A.append(-1) elif N%2==0: for i in range(1,N//2+1): A.append(2*i) else: for i in range((N+1)//2-2): if N-1-2*i!=6: A.append(N-1-2*i) A.append(2) A.append(6) A.append(3) print(*A)