#include <bits/stdc++.h>
using namespace std;
int B[400010][2], Lis[400010], cnt, tmp, n;
void Search(int x = 0, int p = 0) {
  for (int i = 0; i < 2; i++)
    if (!B[x][i]) B[x][i] = 1, Search((x * 2 + i) % tmp, i);
  Lis[cnt--] = p;
}
int main() {
  scanf("%d", &n), cnt = n, tmp = n / 2;
  if (n & 1) return puts("-1"), 0;
  Search();
  for (int i = 1, x = 0;; i++) {
    printf("%d ", x);
    if (i == n) return puts("0"), 0;
    x = (x * 2 + Lis[i + 1]) % n;
  }
}
