#include <bits/stdc++.h>
using namespace std;
struct debugger {
  template <typename T>
  debugger& operator,(const T& v) {
    cerr << v << " ";
    return *this;
  }
} dbg;
void debugarr(int* arr, int n) {
  cout << "[";
  for (int i = 0; i < n; i++) cout << arr[i] << " ";
  cout << "]" << endl;
}
int main() {
  int n;
  cin >> n;
  if (n % 4 == 2 || n % 4 == 3) {
    cout << -1 << endl;
    return 0;
  }
  int arr[100010] = {0};
  int x = 2, y = n;
  for (int i = 0; i < n / 2; i += 2) {
    arr[i] = x;
    arr[i + 1] = y;
    arr[n - 1 - i] = n + 1 - x;
    arr[n - 1 - i - 1] = n + 1 - y;
    x += 2;
    y -= 2;
  }
  if (n % 2) arr[(n) / 2] = (n + 1) / 2;
  for (int i = 0; i <= (int)n - 1; i++) cout << arr[i] << ' ';
  cout << endl;
  return 0;
}
