#include <bits/stdc++.h>
using namespace std;
const double PI = 3.1415926535;
int n;
int main() {
  cin >> n;
  if (n % 4 > 1)
    cout << -1;
  else {
    int x = n / 4;
    for (int i = 0; i < x; ++i) printf("%d %d ", 2 + i * 2, n - i * 2);
    if (n % 4 == 1) printf("%d ", n / 2 + 1);
    for (int i = x - 1; i >= 0; --i) printf("%d %d ", 1 + i * 2, n - 1 - i * 2);
  }
  return 0;
}
