#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > e[100010];
bool v[100010];
vector<int> ret;
void F(int u, int id) {
  for (int i = 0; i < (int)e[u].size(); i++) {
    if (!v[e[u][i].second]) {
      v[e[u][i].second] = 1;
      F(e[u][i].first, e[u][i].second);
    }
  }
  if (~id) ret.push_back(id);
}
int main() {
  int n;
  scanf("%d", &n);
  if (n & 1) return puts("-1"), 0;
  n /= 2;
  for (int i = 0; i < n; i++) {
    e[i].push_back(make_pair(2 * i % n, 2 * i));
    e[i].push_back(make_pair((2 * i + 1) % n, 2 * i + 1));
  }
  F(0, -1);
  for (int i = ret.size() - 1; i >= 0; i--) printf("%d ", ret[i]);
  printf("0");
  return 0;
}
