#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("unroll-loops")
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const int N = 2e5 + 42;
bool u[N];
int ans[N];
int cpos = 0, n = 0;
void dfs(int v) {
  u[v] = true;
  if (!u[(v << 1) % n]) dfs((v << 1) % n);
  if (!u[((v << 1) + 1) % n]) dfs(((v << 1) + 1) % n);
  ans[cpos++] = v;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  if (n % 2) {
    cout << -1;
    return 0;
  }
  dfs(0);
  for (int i = n - 1; i >= 0; i--) cout << ans[i] << ' ';
  cout << 0;
  return 0;
}
