#include <bits/stdc++.h>
using namespace std;
int vis[110000];
int st[110000], top;
int main() {
  int n, m, i, j, k, x;
  scanf("%d", &n);
  if (n & 1) {
    puts("-1");
    return 0;
  }
  st[++top] = 0;
  x = n / 2;
  while (x) {
    st[++top] = x;
    vis[x] = 1;
    if (x + n >> 1 < n && !vis[x + n >> 1])
      x = x + n >> 1;
    else
      x = x >> 1;
  }
  st[++top] = 0;
  while (top) printf("%d ", st[top--]);
  return 0;
}
