#include <bits/stdc++.h>
#pragma GCC optimize("-O3")
using namespace std;
void Main();
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie();
  Main();
  return 0;
}
const int N = 2e6 + 10;
int a[N];
bool b[N];
void Main() {
  int n;
  cin >> n;
  if (n == 1) {
    cout << "0 0\n";
    return;
  }
  if (n & 1) {
    cout << "-1\n";
    return;
  }
  for (int i = n; i > 0; i--) {
    if (b[(a[i] + n) >> 1]) {
      a[i - 1] = a[i] >> 1;
      b[a[i - 1]] = true;
    } else {
      a[i - 1] = (a[i] + n) >> 1;
      b[a[i - 1]] = true;
    }
  }
  for (int i = 0; i <= n; i++) {
    cout << a[i] << " \n"[i == n];
  }
}
