#include <bits/stdc++.h>
const int MAXN = 100000;
using namespace std;
int ans[1 + MAXN + 1];
int n, m;
struct Graph {
  int node, actualnode;
};
deque<Graph> g[1 + MAXN + 1];
void dfs(int source) {
  while (!g[source].empty()) {
    int nextnode = g[source][0].node;
    int actnode = g[source][0].actualnode;
    g[source].pop_front();
    dfs(nextnode);
    ans[++m] = actnode;
  }
}
int main() {
  cin >> n;
  if (n % 2 != 0)
    cout << "-1";
  else {
    for (int i = 0; i < n; i++) {
      Graph nod = {(i * 2) % n / 2, i};
      g[i / 2].push_back(nod);
    }
    dfs(0);
    if (m != n)
      cout << "-1";
    else {
      for (int i = n; i >= 0; i--) cout << ans[i] << " ";
    }
  }
  return 0;
}
