#include <bits/stdc++.h>
#pragma GCC optimize("O3")
const int inf = INT_MAX;
const int nmax = 1e5 + 5;
const int mod = 1e9 + 7;
using namespace std;
int n, viz[nmax], i, ans[nmax], idx;
void dfs(int x) {
  if (viz[x]) return;
  viz[x] = 1;
  dfs((2 * x) % n);
  dfs((2 * x + 1) % n);
  ans[++idx] = x;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cerr.tie(0);
  cout.tie(0);
  cin >> n;
  if (n & 1) return cout << -1 << endl, 0;
  ans[++idx] = 0;
  dfs(0);
  for (i = idx; i >= 1; i--) cout << ans[i] << " ";
  cout << endl;
  return 0;
}
