#include <bits/stdc++.h>
using namespace std;
const long long A = 100000000000000LL, N = 228228;
long long a[N], i, j, n, m;
void rec(long long v) {
  a[v] = 1;
  if (v != 1) rec(a[(v + n) / 2] ? v / 2 : (v + n) / 2), printf(" %d", v);
}
int main() {
  cin >> n;
  if (n % 2)
    puts("-1");
  else
    cout << "0 1", rec(0);
}
