#include <bits/stdc++.h>
using namespace std;
int n, f[100001], nast[100001];
int find(int i) { return f[i] == i ? i : f[i] = find(f[i]); }
void uni(int a, int b) { f[find(a)] = find(b); }
int main() {
  cin >> n;
  ;
  if (n & 1) {
    cout << -1 << endl;
    return 0;
  }
  for (int i = 0; i < n; i++) f[i] = i;
  for (int i = 0; i < n / 2; i++) {
    nast[i] = i * 2 % n;
    uni(i, i * 2 % n);
    nast[n / 2 + i] = (i * 2 + 1) % n;
    uni(n / 2 + i, (i * 2 + 1) % n);
  }
  for (int i = 0; i < n / 2; i++) {
    if (find(i) != find(n / 2 + i)) {
      nast[i] = (i * 2 + 1) % n;
      nast[n / 2 + i] = i * 2 % n;
      uni(i, n / 2 + i);
    }
  }
  cout << 0 << " " << endl;
  int ak = 0;
  do {
    ak = nast[ak];
    cout << ak << " ";
  } while (ak != 0);
  cout << endl;
}
