#include <bits/stdc++.h>
using namespace std;
template <class T>
inline int size(const T& c) {
  return c.size();
}
using namespace std;
int fastMax(int x, int y) { return (((y - x) >> (32 - 1)) & (x ^ y)) ^ y; }
int fastMin(int x, int y) { return (((y - x) >> (32 - 1)) & (x ^ y)) ^ x; }
const double eps = 0.00000001;
const int maxn = 100010;
int u, n;
int second;
int res[maxn];
bool used[maxn];
int main() {
  cin >> n;
  res[++second] = 0;
  for (int i = (1), _b = (n); i <= _b; i++) {
    if (used[(res[second] + n) / 2] == false) {
      res[second + 1] = (res[second] + n) / 2;
      ++second;
      used[res[second]] = true;
    } else if (used[res[second] / 2] == false) {
      res[second + 1] = res[second] / 2;
      ++second;
      used[res[second]] = true;
    } else {
      cout << -1;
      return 0;
    }
  }
  for (int i = (second), _a = (1); i >= _a; i--) cout << res[i] << ' ';
  fclose(stdin);
  fclose(stdout);
  return 0;
}
