#include <bits/stdc++.h>
using namespace std;
const int M = 100005;
int a[M];
int main() {
  ios::sync_with_stdio(0);
  int n;
  cin >> n;
  if (n % 4 > 1) {
    cout << -1;
  } else {
    for (int i = 1; i <= n / 2; i++) {
      if (i % 2)
        a[i] = i + 1;
      else
        a[i] = n - i + 2;
    }
    if (n % 2) a[n / 2 + 1] = n / 2 + 1;
    for (int i = n / 2 + 1; i <= n; i++) a[i] = n + 1 - a[n - i + 1];
    for (int i = 1; i <= n; i++) cout << a[i] << ' ';
  }
  return 0;
}
