#include <bits/stdc++.h>
using namespace std;
int re() {
  int ret = 0, f = 1;
  char ch = getchar();
  while (!isdigit(ch)) f = (ch == '-') ? -f : f, ch = getchar();
  while (isdigit(ch)) ret = ret * 10 + ch - '0', ch = getchar();
  return ret * f;
}
int n, vis[100005];
vector<int> ans;
void dfs(int x) {
  vis[x] = 1;
  if (!vis[(x * 2) % n]) dfs((x * 2) % n);
  if (!vis[(x * 2 + 1) % n]) dfs((x * 2 + 1) % n);
  ans.push_back(x);
}
signed main() {
  n = re();
  if (n & 1)
    puts("-1");
  else {
    dfs(0);
    reverse(ans.begin(), ans.end());
    ans.push_back(0);
    for (auto x : ans) printf("%d ", x);
  }
  return 0;
}
