#include <bits/stdc++.h>
int ar[100005], cnt = 0, n;
bool vis[100005] = {0};
void dfs(int now);
int main(void) {
  scanf("%d", &n);
  if (n % 2) {
    printf("-1");
    return 0;
  }
  dfs(0);
  for (int i = n - 1; i >= 0; --i) printf("%d ", ar[i]);
  putchar('0');
  return 0;
}
void dfs(int now) {
  vis[now] = 1;
  if (!vis[now * 2 % n]) dfs(now * 2 % n);
  if (!vis[(now * 2 + 1) % n]) dfs((now * 2 + 1) % n);
  ar[cnt++] = now;
  return;
}
