#include <bits/stdc++.h>
using namespace std;
int ans[101000], vis[101000];
int main() {
  int n, i, a, b, c;
  while (scanf("%d", &n) != EOF) {
    memset(vis, 0, sizeof(vis));
    ans[0] = c = 0;
    vis[0] = 1;
    for (i = 1; i < n; i++) {
      a = c / 2;
      b = (c + n) / 2;
      if (a > b) swap(a, b);
      if (vis[b] == 0) {
        ans[i] = b;
        c = b;
      } else if (vis[b] && vis[a] == 0) {
        ans[i] = a;
        c = a;
      } else
        break;
      vis[c] = 1;
    }
    if (i < n || n > 1 && ans[n - 1] != 1)
      puts("-1");
    else {
      printf("0");
      for (i = n - 1; i >= 0; i--) {
        printf(" %d", ans[i]);
      }
      puts("");
    }
  }
  return 0;
}
