#include <bits/stdc++.h>
using namespace std;
int read() {
  int x = 0, f = 1;
  char c = getchar();
  while ((c < '0' || c > '9')) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (!(c < '0' || c > '9')) {
    x = x * 10 + c - '0';
    c = getchar();
  }
  return x * f;
}
const int N = 1e5 + 5;
int n, vis[N];
stack<int> s;
void dfs(int u) {
  if (vis[u]) return;
  vis[u] = true;
  dfs((u * 2) % n);
  dfs((u * 2 + 1) % n);
  s.push(u);
}
int main() {
  n = read();
  if (n % 2) {
    cout << -1;
    return 0;
  }
  dfs(0);
  while (!s.empty()) {
    cout << s.top() << ' ';
    s.pop();
  }
  cout << 0;
  return 0;
}
