#include <bits/stdc++.h>
using namespace std;
const double PI = 3.141592653589793238463;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  vector<int> p(n);
  for (int i = 0; i < n; ++i) {
    cin >> p[i];
  }
  if (n % 4 == 3 || n % 4 == 2) {
    cout << -1 << endl;
    return 0;
  }
  vector<int> a(n + 1);
  int l = 1, r = n;
  while (l < r) {
    a[l] = l + 1;
    a[l + 1] = r;
    a[r] = r - 1;
    a[r - 1] = l;
    l += 2;
    r -= 2;
  }
  if (l == r) {
    a[l] = l;
  }
  for (int i = 0; i < n; ++i) {
    cout << a[i + 1] << " ";
  }
  cout << endl;
  return 0;
}
