#include <bits/stdc++.h>
using namespace std;
int N;
int main() {
  scanf("%d", &N);
  if (N % 4 == 2 || N % 4 == 3) {
    printf("-1\n");
    return 0;
  }
  for (int i = 1; i <= N / 2; i += 2) {
    printf("%d %d ", i + 1, N - i + 1);
  }
  if (N % 4 == 1) printf("%d ", (N + 1) / 2);
  for (int i = (N + 3) / 2; i <= N; i += 2) {
    printf("%d %d ", N - i, i);
  }
}
