#include <bits/stdc++.h>
using namespace std;
int a[1000001], n;
int main() {
  cin >> n;
  if ((n / 2) % 2) {
    cout << -1 << endl;
    return 0;
  }
  int l = 2, r = n;
  for (int i = 1; i <= n / 2; i++) {
    if (i % 2)
      a[i] = l, a[n - i] = l - 1, l += 2;
    else
      a[i] = r, a[n - i + 2] = r - 1, r -= 2;
  }
  if (n % 2) a[n / 2 + 1] = n / 2 + 1;
  for (int i = 1; i <= n; i++) cout << a[i] << " ";
  return 0;
}
