#include <bits/stdc++.h>
using namespace std;
const int maxn = 100000 + 10;
int a[maxn];
bool mark[maxn];
bool flag;
int n;
void solve(int v) {
  mark[v] = true;
  if (v == 1) {
    flag = true;
    cout << 0 << " " << 1;
    return;
  }
  if (!mark[(v + n) / 2])
    solve((v + n) / 2);
  else
    solve(v / 2);
  cout << " " << v;
}
int main() {
  cin >> n;
  if (n % 2)
    cout << -1;
  else
    solve(0);
}
