#include <bits/stdc++.h>
const int MAX_N = 100000;
std::deque<std::pair<int, int> > graph[MAX_N];
std::deque<int> tour;
void euler_tour(int nod) {
  while (!graph[nod].empty()) {
    int label = graph[nod][0].second, nod_target = graph[nod][0].first;
    graph[nod].pop_front();
    euler_tour(nod_target);
    tour.push_front(label);
  }
}
int main() {
  int n;
  scanf("%d", &n);
  if (n % 2 == 1)
    printf("-1");
  else {
    for (int i = 0; i < n; ++i) {
      int q1, q2;
      q1 = i / 2;
      q2 = ((i * 2) % n) / 2;
      graph[q1].push_back({q2, i});
    }
    euler_tour(0);
    if (tour.size() != n)
      printf("-1");
    else {
      for (auto it : tour) printf("%d ", it);
      printf("0");
    }
  }
  return 0;
}
