#include <bits/stdc++.h>
int n, nxt[100005], fa[100005];
int find(int x) { return fa[x] == x ? x : fa[x] = find(fa[x]); }
int main(void) {
  scanf("%d", &n);
  if (n % 2) {
    puts("-1");
    return 0;
  }
  for (int i = 0; i <= n; i++) fa[i] = i;
  for (int i = 0; i < (n / 2); i++) {
    int j = i + (n / 2);
    nxt[i] = i * 2, nxt[j] = i * 2 + 1;
    fa[find(i)] = find((i * 2) % n);
    fa[find(j)] = find((i * 2 + 1) % n);
  }
  for (int i = 0; i < (n / 2); i++) {
    int j = i + (n / 2);
    if (find(i) != find(j)) {
      nxt[i] ^= nxt[j] ^= nxt[i] ^= nxt[j];
      fa[find(i)] = find(j);
    }
  }
  int x = 0;
  for (int i = 0; i <= n; i++) printf("%d ", x), x = nxt[x];
  return 0;
}
