#include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
long double sqr(long double a) { return a * a; }
const long long int inf = 1000000000000000LL;
long double mpow(long double a, long long int b) {
  if (b == 0) return 1.0;
  if (b % 2 == 0) {
    long double c = mpow(a, b / 2);
    return c * c;
  }
  return a * mpow(a, b - 1);
}
template <typename tname>
class Array {
 private:
  tname x;

 public:
  Array() {}
};
struct T {};
struct V {};
class Hist {
 public:
  Hist(Array<T>* a);
  void append(T);
  void commit();
  void undo();
};
long long int FINISH_X = 0;
long long int FINISH_Y = 0;
long long int visited[201][201][6][6];
struct CubeState {
  long long int faces[6];
  long long int x, y;
  CubeState() {
    x = 0, y = 0;
    for (int i = 0; i < 6; ++i) {
      faces[i] = i;
    }
  }
  long long int getTopFace() const { return faces[1]; }
  long long int getFrontFace() const { return faces[2]; }
  void setLength(long long int length) {
    visited[x + 100][y + 100][getTopFace()][getFrontFace()] = length;
  }
  long long int getLength() const {
    return visited[x + 100][y + 100][getTopFace()][getFrontFace()];
  }
  bool isAtFinish() const {
    return (faces[0] == 0 && faces[1] == 1 && x == FINISH_X && y == FINISH_Y);
  }
  bool isInside() { return (abs(x) <= 30 && abs(y) <= 30); }
};
CubeState rotate_cube_up(CubeState& cs) {
  CubeState newState = cs;
  newState.faces[1] = cs.faces[0];
  newState.faces[2] = cs.faces[1];
  newState.faces[3] = cs.faces[2];
  newState.faces[0] = cs.faces[3];
  newState.y++;
  return newState;
}
CubeState rotate_cube_down(CubeState& cs) {
  CubeState newState = cs;
  newState.faces[0] = cs.faces[1];
  newState.faces[1] = cs.faces[2];
  newState.faces[2] = cs.faces[3];
  newState.faces[3] = cs.faces[0];
  newState.y--;
  return newState;
}
CubeState rotate_cube_right(CubeState& cs) {
  CubeState newState = cs;
  newState.faces[1] = cs.faces[5];
  newState.faces[4] = cs.faces[1];
  newState.faces[3] = cs.faces[4];
  newState.faces[5] = cs.faces[3];
  newState.x++;
  return newState;
}
CubeState rotate_cube_left(CubeState& cs) {
  CubeState newState = cs;
  newState.faces[5] = cs.faces[1];
  newState.faces[1] = cs.faces[4];
  newState.faces[4] = cs.faces[3];
  newState.faces[3] = cs.faces[5];
  newState.x--;
  return newState;
}
long long int mySign(long long int num) {
  if (num == 0) {
    return 0;
  }
  return (num > 0) ? 1 : -1;
}
int main() {
  clock_t start = clock();
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout << fixed << setprecision(15);
  srand(13);
  int n;
  cin >> n;
  if (n % 4 == 2 || n % 4 == 3) {
    cout << "-1 ";
    return 0;
  }
  vector<long long int> a, b;
  int x = 1;
  int y = n;
  while (x < y) {
    a.push_back(x + 1);
    a.push_back(y);
    b.push_back(y - 1);
    b.push_back(x);
    x += 2;
    y -= 2;
  }
  for (int i = 0; i < a.size(); ++i) {
    cout << a[i] << " ";
  }
  if (n % 2 == 1) cout << n / 2 + 1 << " ";
  for (int i = 0; i < b.size(); ++i) {
    cout << b[b.size() - i - 1] << " ";
  }
  return 0;
}
