#include <bits/stdc++.h>
bool vis[100050];
int n;
void dfs(int x) {
  vis[x] = true;
  if (x == 1)
    printf("0 1");
  else {
    if (vis[(x + n) / 2])
      dfs(x / 2);
    else
      dfs((x + n) / 2);
    printf(" %d", x);
  }
}
int main() {
  scanf("%d", &n);
  if (n % 2)
    printf("-1\n");
  else {
    memset(vis, false, sizeof(vis));
    dfs(0);
    printf("\n");
  }
  return 0;
}
