#include <bits/stdc++.h>
using namespace std;
int ans[120001], n, i;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  if (n / 2 % 2 != 0) {
    cout << "-1" << '\n';
    return 0;
  }
  for (i = 2; i <= n / 2; i += 2) {
    ans[i - 1] = i;
    ans[i] = n - i + 2;
    ans[n - i + 1] = i - 1;
    ans[n - i + 2] = n - i + 1;
  }
  if (n % 2 != 0) ans[(n + 1) / 2] = (n + 1) / 2;
  for (i = 1; i <= n; i++) cout << ans[i] << " ";
  cout << '\n';
  return 0;
}
