#include <bits/stdc++.h>
using namespace std;
const int Maxn = 101000;
int a[Maxn];
int n;
int main() {
  scanf("%d", &n);
  if ((n / 2) % 2 == 1) {
    printf("-1\n");
    return 0;
  }
  for (int i1 = 1, i2 = 2, i3 = n - 1, i4 = n; i2 < i3;) {
    a[i1] = i2;
    a[i2] = i4;
    a[i4] = i3;
    a[i3] = i1;
    i1 += 2;
    i2 += 2;
    i3 -= 2;
    i4 -= 2;
  }
  if (n % 2 == 1) a[n / 2 + 1] = n / 2 + 1;
  for (int i = 1; i <= n; ++i) printf("%d ", a[i]);
  printf("\n");
  return 0;
}
