#include <bits/stdc++.h>
using namespace std;
const int maxx = 1e5 + 100;
int vis[maxx];
int n, tot;
inline int dfs(int u, vector<int> &ans) {
  vis[u] = 1;
  if (!vis[(u * 2) % n]) dfs((u * 2) % n, ans);
  if (!vis[(u * 2 + 1) % n]) dfs((u * 2 + 1) % n, ans);
  ans.push_back(u);
}
int main() {
  while (~scanf("%d", &n)) {
    if (n & 1)
      cout << "-1" << endl;
    else {
      memset(vis, 0, sizeof(vis));
      vector<int> ans;
      dfs(0, ans);
      reverse(ans.begin(), ans.end());
      for (int i = 0; i < n; i++) cout << ans[i] << " ";
      cout << 0 << endl;
    }
  }
  return 0;
}
