#include <bits/stdc++.h>
using namespace std;
int N;
int arr[100010];
inline void ReadInput(void) { scanf("%d", &N); }
inline void solve(void) {
  if (N % 4 == 0) {
    for (int i = 1; i <= N / 2; i += 2) {
      arr[i] = i + 1;
      arr[i + 1] = N - i + 1;
      arr[N - i + 1] = N - i;
      arr[N - i] = i;
    }
    for (int i = 1; i <= N; i++) {
      cout << arr[i] << " ";
    }
    cout << endl;
  } else if (N % 4 == 1) {
    for (int i = 1; i <= N / 2 + 1; i += 2) {
      if (i == N / 2 + 1) {
        arr[i] = N / 2 + 1;
        i++;
        break;
      }
      arr[i] = i + 1;
      arr[i + 1] = N - i + 1;
      arr[N - i + 1] = N - i;
      arr[N - i] = i;
    }
    for (int i = 1; i <= N; i++) {
      cout << arr[i] << " ";
    }
    cout << endl;
  } else {
    cout << -1 << endl;
  }
}
inline void Refresh(void) {}
int main() {
  ReadInput();
  solve();
  return 0;
}
