#include <bits/stdc++.h>
const double PI = acos(-1.0);
const double EPS = 1E-9;
const int INF = (int)1E9;
using namespace std;
int N, L;
bool v[100005];
int ans[100005];
void solve(int i) {
  v[i] = 1;
  ans[L++] = i;
  if (!v[i + N >> 1]) {
    solve(i + N >> 1);
  } else {
    if (!v[i >> 1]) solve(i >> 1);
  }
}
int main() {
  memset(v, 0, sizeof(v));
  cin >> N;
  if (N % 2) return 0, puts("-1");
  L = 0;
  solve(0);
  printf("0 ");
  for (int i = (L)-1; i >= 0; i--) printf("%d ", ans[i]);
  return 0;
}
