#include <bits/stdc++.h>
int n, i, j, k, now, cnt;
int flag;
bool done[100111];
std::list<int> ans;
void go(int now) {
  done[now] = true;
  ++cnt;
  if (now == 1) {
    printf("0 1");
    return;
  }
  if (now & 1)
    if (!done[n + now - 1 >> 1])
      go(n + now - 1 >> 1);
    else
      go(now - 1 >> 1);
  else if (!done[n + now >> 1])
    go(n + now >> 1);
  else
    go(now >> 1);
  printf(" %d", now);
}
int main() {
  scanf("%d", &n);
  if (n & 1) {
    puts("-1");
    return 0;
  }
  {
    memset(done, 0, sizeof done);
    cnt = 0;
    go(0);
    puts("");
    if (cnt != n) {
      printf("%d %d\n", cnt, n);
      return 0;
    }
  }
  return 0;
}
