#include <bits/stdc++.h>
using namespace std;
bool vis[1000010];
int sol[1000010];
int main() {
  int n;
  scanf("%d", &n);
  if (n % 2 == 1) return puts("-1"), 0;
  int x = 0;
  for (int i = 0; i < n; i++) {
    vis[x] = 1;
    sol[i] = x;
    if (!vis[x / 2 + n / 2])
      x = x / 2 + n / 2;
    else
      x = x / 2;
  }
  printf("0");
  for (int i = n - 1; i >= 0; i--) printf(" %d", sol[i]);
  puts("");
  return 0;
}
