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