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