#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f, maxn = 100005;
int n, vis[maxn], ans[maxn], res;
void dfs(int u) {
  if (vis[u]) return;
  vis[u] = 1;
  dfs(2 * u % n);
  dfs((2 * u + 1) % n);
  ans[res++] = u;
}
int main() {
  scanf("%d", &n);
  if (n & 1)
    printf("-1\n");
  else {
    res = 0;
    dfs(0);
    for (int i = res - 1; i >= 0; i--) printf("%d ", ans[i]);
    printf("0\n");
  }
  return 0;
}
