#include <bits/stdc++.h>
using namespace std;
int vis[100010] = {0};
int N;
int Out[100010] = {0};
int Op;
void dfs(int cnt) {
  vis[cnt] = 1;
  if (vis[(cnt + N) >> 1] == 0)
    dfs((cnt + N) >> 1);
  else if (vis[cnt >> 1] == 0)
    dfs(cnt >> 1);
  printf(" %d", cnt);
  return;
}
int main() {
  cin >> N;
  if (N & 1) {
    puts("-1");
    return 0;
  }
  printf("0");
  dfs(0);
  return 0;
}
