#include <bits/stdc++.h>
using namespace std;
int n;
struct edge {
  int to, from, next;
  bool ban;
} e[100005];
int h[100005], tp;
void ae(int u, int v) {
  e[++tp].to = v;
  e[tp].from = u;
  e[tp].next = h[u];
  h[u] = tp;
}
int st[100005], top;
int ans[100005];
void dfs(int u, int f) {
  for (int v, i = h[u]; i; i = e[i].next)
    if (!e[i].ban) {
      v = e[i].to;
      e[i].ban = 1;
      dfs(v, i);
    }
  st[++top] = f;
}
int main() {
  cin >> n;
  if (n & 1) {
    puts("-1");
    return 0;
  }
  if (n == 2) {
    puts("0 1 0");
    return 0;
  }
  for (int i = 0; i < n / 2; i++) {
    int x = i * 2, y = x + 1;
    ae(i, x * 2 % n / 2);
    ae(i, y * 2 % n / 2);
  }
  dfs(0, -1);
  for (int u, i = 2; i <= top; i++) {
    u = e[st[i]].from;
    if (u * 2 * 2 % n == ans[i - 1] || (u * 2 * 2 + 1) % n == ans[i - 1])
      ans[i] = u * 2;
    else
      ans[i] = u * 2 + 1;
  }
  for (int i = top; i; i--) printf("%d ", ans[i]);
}
