#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
int n, cnt[N];
struct edge {
  int to, nx, dl, id;
} ee[N];
int eq[N], en = 1;
int dv[N], dvt;
void link(int u, int v, int id) {
  swap(u, v);
  ee[++en] = (edge){v, eq[u], 0, id}, eq[u] = en;
}
void dfs(int u) {
  for (int j = eq[u], v; v = ee[j].to, j; j = ee[j].nx)
    if (!ee[j].dl) {
      ee[j].dl = 1;
      dfs(v);
      dv[dvt++] = ee[j].id;
    }
}
int main() {
  scanf("%d", &n);
  if (n & 1) {
    printf("-1\n");
    return 0;
  }
  for (int i = 0; i < n; ++i) {
    link(i >> 1, (2 * i) % n >> 1, i);
  }
  dfs(0);
  int q = 0;
  while (dv[q]) ++q;
  for (int i = 0; i < n; ++i) {
    printf("%d ", dv[(q + i) % n]);
  }
  printf("0\n");
}
