#include <bits/stdc++.h>
const int N = 100005;
bool vis[N];
int n, nxt[N];
void dfs(int x) {
  if (vis[x]) return;
  vis[x] = true;
  int t1 = x * 2 % n, t2 = (t1 + 1) % n;
  if (!vis[t1]) {
    nxt[x] = t1;
    dfs(t1);
  } else if (!vis[t2]) {
    nxt[x] = t2;
    dfs(t2);
  }
  if (!vis[(x + n / 2) % n]) {
    nxt[x] = t2;
    dfs(t2);
    nxt[(x + n / 2) % n] = t1;
  }
}
int main() {
  scanf("%d", &n);
  if (n % 2) {
    puts("-1");
    return 0;
  }
  dfs(0);
  for (int i = 0, j = 0; j < n + 1; i = nxt[i], j++) {
    printf("%d ", i);
  }
  return 0;
}
