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