#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> arr(n + 1);
  for (int cnt = 1; cnt <= n; cnt++) {
    if (cnt * 2 == 1 + n)
      arr[cnt] = cnt;
    else if (cnt <= n / 2) {
      if (cnt % 2)
        arr[cnt] = cnt + 1;
      else
        arr[cnt] = n - cnt + 2;
    } else {
      if ((n - cnt + 1) % 2)
        arr[cnt] = cnt - 1;
      else
        arr[cnt] = n - cnt;
    }
  }
  for (int cnt = 1; cnt <= n; cnt++) {
    if (arr[arr[cnt]] != n - cnt + 1) {
      printf("-1\n");
      return 0;
    }
  }
  for (int cnt = 1; cnt <= n; cnt++) {
    if (cnt - 1) printf(" ");
    printf("%d", arr[cnt]);
  }
  return 0;
}
