#include <bits/stdc++.h>
using namespace std;
int N, P[200001];
int main() {
  cin >> N;
  if (N & 1) {
    if (N % 4 == 1) {
      for (int i = 1; i <= N / 2; i += 2) {
        P[i] = i + 1;
        P[i + 1] = N - i + 1;
        P[N - i + 1] = N - i;
        P[N - i] = i;
      }
      P[N / 2 + 1] = N / 2 + 1;
      for (int i = 1; i < N; ++i) cout << P[i] << " ";
      cout << P[N] << endl;
    } else
      cout << -1 << endl;
  } else {
    if (N % 4 == 0) {
      for (int i = 1; i <= N / 2; i += 2) {
        P[i] = i + 1;
        P[i + 1] = N - i + 1;
        P[N - i + 1] = N - i;
        P[N - i] = i;
      }
      for (int i = 1; i < N; ++i) cout << P[i] << " ";
      cout << P[N] << endl;
    } else
      cout << -1 << endl;
  }
  return 0;
}
