#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  if (n & 1) {
    cout << -1;
    return;
  }
  vector<bool> trk(n);
  vector<int> euler;
  function<void(int)> dfs = [&](int u) {
    if (trk[u]) return;
    trk[u] = 1;
    dfs((u << 1) % n);
    dfs((u << 1 | 1) % n);
    euler.push_back(u);
  };
  dfs(0);
  reverse(euler.begin(), euler.end());
  euler.push_back(0);
  for (auto& x : euler) {
    cout << x << ' ';
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  solve();
  return 0;
}
