#include <bits/stdc++.h>
using namespace std;
int n, i;
vector<int> way;
vector<char> met;
int f1(int v) { return (v + n) / 2; }
int f2(int v) { return v / 2; }
int main() {
  cin >> n;
  if (n % 2 == 1) {
    cout << -1;
    return 0;
  }
  met.resize(n);
  way.push_back(0);
  int v = n / 2;
  while (true) {
    met[v] = true;
    way.push_back(v);
    if (v == 0) break;
    if (v == 1) {
      v = 0;
      continue;
    }
    if (!met[f1(v)])
      v = f1(v);
    else
      v = f2(v);
  }
  reverse(way.begin(), way.end());
  for (int i = 0; i < (int)way.size(); i++) cout << way[i] << ' ';
  return 0;
}
