#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100000 + 3;
struct Edge {
  Edge* next;
  int to, num;
};
Edge mem[MAXN];
Edge* curMem;
Edge* info[MAXN];
int ans[MAXN], cntAns;
void init() {
  memset(info, 0, sizeof(info));
  curMem = mem;
  cntAns = 0;
}
void insert(int v, int u, int n) {
  curMem->to = u;
  curMem->next = info[v];
  curMem->num = n;
  info[v] = curMem++;
}
void dfs(int v) {
  while (info[v]) {
    int u = info[v]->to;
    int num = info[v]->num;
    info[v] = info[v]->next;
    dfs(u);
    ans[cntAns++] = num;
  }
}
int main() {
  int n;
  while (scanf("%d", &n) == 1) {
    if (n & 1) {
      printf("-1\n");
      continue;
    }
    init();
    for (int i = 0; i < n; i += 2) {
      insert(i >> 1, ((i << 1) % n) >> 1, i);
      insert(i >> 1, (((i ^ 1) << 1) % n) >> 1, i ^ 1);
    }
    dfs(0);
    printf("0");
    for (int i = cntAns - 1; i >= 0; i--) printf(" %d", ans[i]);
    printf("\n");
  }
  return 0;
}
