#include <bits/stdc++.h>
using namespace std;
int N, M, f[100005], p[100005];
void doit() {
  function<int(int)> find = [&](int x) {
    return x == f[x] ? x : f[x] = find(f[x]);
  };
  auto add = [&](int x, int y) { p[x] = y, f[find(x)] = find(y); };
  scanf("%d", &N), M = N / 2;
  if (N & 1) {
    puts("-1");
    return;
  }
  for (int i = 0; i < N; i++) f[i] = i;
  for (int i = 0; i < M; i++) add(i, 2 * i), add(i + M, 2 * i + 1);
  for (int i = 0; i < M; i++)
    if (find(i) != find(i + M)) swap(p[i], p[i + M]), f[find(i)] = find(i + M);
  for (int i = 0; printf("%d ", i), p[i]; i = p[i])
    ;
  puts("0");
}
int main() {
  doit();
  return 0;
}
