#include <bits/stdc++.h>
using namespace std;
const int maxn = 100100;
int n, to[maxn], fa[maxn];
int find(int x) { return fa[x] == x ? x : fa[x] = find(fa[x]); }
int main() {
  cin >> n;
  if (n % 2 == 1) {
    puts("-1");
    return 0;
  }
  for (int i = 0; i < n; i++) {
    fa[i] = i;
  }
  for (int i = 0; i < (n / 2); i++) {
    int j = i + (n / 2);
    to[i] = i * 2;
    to[j] = i * 2 + 1;
    fa[find(i)] = find((i * 2) % n);
    fa[find(j)] = find((i * 2 + 1) % n);
  }
  for (int i = 0; i < (n / 2); i++) {
    int j = i + (n / 2);
    if (find(i) != find(j)) {
      swap(to[i], to[j]);
      fa[find(i)] = find(j);
    }
  }
  int p = 0;
  for (int i = 1; i <= n + 1; i++) {
    printf("%d ", p);
    p = to[p];
  }
  return 0;
}
