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