#include <bits/stdc++.h>
using namespace std;
bool v[100005];
stack<int> s;
int main() {
  int n;
  cin >> n;
  if (n & 1)
    puts("-1");
  else {
    int x = n / 2;
    v[x] = 1;
    while (x != 1) {
      s.push(x);
      int p = (x + n) / 2;
      if (v[p])
        x = x / 2;
      else
        x = p;
      v[p] = 1;
    }
    s.push(1);
    s.push(0);
    while (!s.empty()) printf("%d ", s.top()), s.pop();
    cout << 0 << endl;
  }
  return 0;
}
