#include <bits/stdc++.h>
using namespace std;
bool vis[100000 + 5];
int n, cnt = 0, ans[100000 + 5];
void dfs(int u) {
  if (vis[u]) return;
  vis[u] = 1;
  dfs((u << 1) % n);
  dfs((u << 1 | 1) % n);
  ans[++cnt] = u;
}
int main() {
  scanf("%d", &n);
  if (n & 1) {
    puts("-1");
    return 0;
  }
  ans[cnt = 1] = 0;
  dfs(0);
  for (int i = cnt; i; i--) printf("%d ", ans[i]);
  return 0;
}
