#include <bits/stdc++.h>
using namespace std;
inline void read(int &x) {
  int v = 0, f = 1;
  char c = getchar();
  while (!isdigit(c) && c != '-') c = getchar();
  if (c == '-')
    f = -1;
  else
    v = (c & 15);
  while (isdigit(c = getchar())) v = (v << 1) + (v << 3) + (c & 15);
  x = v * f;
}
inline void read(long long &x) {
  long long v = 0ll, f = 1ll;
  char c = getchar();
  while (!isdigit(c) && c != '-') c = getchar();
  if (c == '-')
    f = -1;
  else
    v = (c & 15);
  while (isdigit(c = getchar())) v = (v << 1) + (v << 3) + (c & 15);
  x = v * f;
}
inline void readc(char &x) {
  char c;
  while (((c = getchar()) == ' ') || c == '\n')
    ;
  x = c;
}
int v[300005], n, m, i, j;
void dfs(int x) {
  v[x] = 1;
  if (x != 1) {
    if (!v[(n + x) / 2])
      dfs((x + n) / 2);
    else
      dfs(x / 2);
  }
  printf(" %d", x);
}
int main() {
  cin >> n;
  if (n & 1) {
    puts("-1");
  } else {
    printf("0");
    dfs(0);
  }
  return 0;
}
