#include <bits/stdc++.h>
using namespace std;
bool used[123456];
int main() {
  int n;
  cin >> n;
  vector<pair<int, int> > v1, v2;
  vector<int> ans;
  int a = 2, b = n;
  while (a < b) {
    used[a] = used[b] = 1;
    v1.push_back(make_pair(a, b));
    a += 2;
    b -= 2;
  }
  a = 1, b = n - 1;
  while (a < b) {
    used[a] = used[b] = 1;
    v2.push_back(make_pair(a, b));
    a += 2;
    b -= 2;
  }
  reverse(v2.begin(), v2.end());
  for (int i = 0; i < (int)v1.size(); ++i) {
    ans.push_back(v1[i].first);
    ans.push_back(v1[i].second);
  }
  if (2 * (int)v1.size() + 2 * (int)v2.size() + 1 == n) {
    for (int i = 0; i < n; ++i)
      if (!used[i + 1]) {
        ans.push_back(i + 1);
        break;
      }
  }
  for (int i = 0; i < (int)v2.size(); ++i) {
    ans.push_back(v2[i].first);
    ans.push_back(v2[i].second);
  }
  if ((int)ans.size() == n) {
    for (int i = 0; i < (int)ans.size(); ++i) {
      printf("%d%c", ans[i], " \n"[i == (int)ans.size() - 1]);
    }
  } else {
    puts("-1");
  }
  return 0;
}
