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