#include <bits/stdc++.h>
using namespace std;
const int maxn = int(1e5) + 100;
int n, sum;
int route[maxn];
bool vis[maxn];
void dfs(int cur) {
  if (vis[cur]) return;
  vis[cur] = true;
  dfs((cur * 2) % n);
  dfs((cur * 2 + 1) % n);
  route[++sum] = cur;
}
void solve() {
  dfs(0);
  for (int i = sum; i > 0; --i) printf("%d ", route[i]);
  printf("0\n");
}
int main() {
  while (scanf("%d", &n) != EOF) {
    memset(vis, 0, sizeof(vis));
    sum = 0;
    if (n & 1)
      printf("-1\n");
    else
      solve();
  }
  return 0;
}
