#include <bits/stdc++.h>
using namespace std;
int N, ar[100005], mark[100005];
void sifir() {
  for (int i = 2, j = N; i <= N / 2; i += 2, j -= 2) printf("%d %d ", i, j);
  for (int i = N / 2 - 1, j = N / 2 + 1; i > 0; i -= 2, j += 2)
    printf("%d %d ", i, j);
}
void bir() {
  int orta = N / 2 + 1;
  for (int i = 2, j = N; j > orta; j -= 2, i += 2) printf("%d %d ", i, j);
  printf("%d ", orta);
  for (int i = orta + 1, j = orta - 2; j >= 0; j -= 2, i += 2)
    printf("%d %d ", j, i);
}
int main() {
  scanf("%d", &N);
  if ((N % 4) > 1) return puts("-1"), 0;
  if (N % 4 == 0)
    sifir();
  else
    bir();
}
