#include <bits/stdc++.h>
using namespace std;
struct edge {
  int u, v, c, f, next;
};
struct edge e[200010];
int n, num, N, M;
int head[100010], c[100010];
void add(int u, int v, int c) {
  e[num].u = u;
  e[num].v = v;
  e[num].c = c;
  e[num].next = head[u];
  head[u] = num;
  num++;
}
void dfs(int i) {
  int j;
  j = head[i];
  while (j != -1) {
    if (e[j].f == 0) {
      e[j].f = 1;
      head[i] = j;
      dfs(e[j].v);
      c[++M] = e[j].c;
    } else
      head[i] = e[j].next;
    j = head[i];
  }
}
int main() {
  int i, j, k;
  scanf("%d", &n);
  if (n & 1) {
    printf("%d\n", -1);
    return 0;
  }
  N = n / 2;
  memset(head, -1, sizeof(head));
  for (i = 0; i < N; i++) {
    add(i, (i * 2) % N, i * 2);
    add(i, (i * 2 + 1) % N, i * 2 + 1);
  }
  dfs(0);
  for (i = 1; i <= M; i++)
    if (c[i] == 0) {
      j = i;
      break;
    }
  printf("%d", 0);
  for (k = (j - 2 + M) % M + 1; k != j; k = (k - 2 + M) % M + 1)
    printf(" %d", c[k]);
  printf(" %d\n", 0);
  return 0;
}
