#include <bits/stdc++.h>
using namespace std;
vector<int> v;
vector<int> e[50005];
int n;
void dfs(int x) {
  int cur = x;
  x %= n / 2;
  while (!e[x].empty()) {
    int nx = e[x].back();
    e[x].pop_back();
    dfs(nx);
  }
  v.push_back(cur);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n;
  if (n % 2 == 1) {
    cout << -1 << endl;
    return 0;
  }
  for (int i = 0; i < n / 2; ++i) {
    e[i].push_back(2 * i);
    e[i].push_back(2 * i + 1);
  }
  dfs(0);
  reverse(v.begin(), v.end());
  for (__typeof(v.begin()) it = (v.begin()); it != (v).end(); ++it) {
    if (it != v.begin()) {
      cout << " ";
    }
    cout << *it;
  }
  cout << endl;
}
