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