#include <bits/stdc++.h>
using namespace std;
int n, m;
vector<pair<int, int> > a[100020];
int s[100020], ss;
int c[100020];
void dfs(int x) {
  while (c[x] < a[x].size()) {
    c[x]++;
    int t = a[x][c[x] - 1].second;
    dfs(a[x][c[x] - 1].first);
    s[ss++] = t;
  }
}
int main() {
  scanf("%d", &n);
  if (n & 1) {
    puts("-1");
    return 0;
  }
  n /= 2;
  for (int i = 0; i < n; i++) {
    a[i].push_back(pair<int, int>(i * 2 % n, i * 2));
    a[i].push_back(pair<int, int>((i * 2 + 1) % n, i * 2 + 1));
  }
  dfs(0);
  for (int i = ss; i--;) printf("%d ", s[i]);
  puts("0");
}
