Problem: Piegirl found the red button. You have one last chance to change the inevitable end.

The circuit under the button consists of n nodes, numbered from 0 to n - 1. In order to deactivate the button, the n nodes must be disarmed in a particular order. Node 0 must be disarmed first. After disarming node i, the next node to be disarmed must be either node (2·i) modulo n or node (2·i) + 1 modulo n. The last node to be disarmed must be node 0. Node 0 must be disarmed twice, but all other nodes must be disarmed exactly once. 

Your task is to find any such order and print it. If there is no such order, print -1.

Input

Input consists of a single integer n (2 ≤ n ≤ 105).

Output

Print an order in which you can to disarm all nodes. If it is impossible, print -1 instead. If there are multiple orders, print any one of them.

Examples

Input

2


Output

0 1 0


Input

3


Output

-1

Input

4


Output

0 1 3 2 0


Input

16


Output

0 1 2 4 9 3 6 13 10 5 11 7 15 14 12 8 0

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
template <class T>
void _R(T &x) {
  cin >> x;
}
void _R(int &x) { scanf("%d", &x); }
void _R(int64_t &x) { scanf("%lld", &x); }
void _R(double &x) { scanf("%lf", &x); }
void _R(char &x) { scanf(" %c", &x); }
void _R(char *x) { scanf("%s", x); }
void R() {}
template <class T, class... U>
void R(T &head, U &...tail) {
  _R(head);
  R(tail...);
}
template <class T>
void _W(const T &x) {
  cout << x;
}
void _W(const int &x) { printf("%d", x); }
void _W(const int64_t &x) { printf("%lld", x); }
void _W(const double &x) { printf("%.16f", x); }
void _W(const char &x) { putchar(x); }
void _W(const char *x) { printf("%s", x); }
template <class T, class U>
void _W(const pair<T, U> &x) {
  _W(x.first);
  putchar(' ');
  _W(x.second);
}
template <class T>
void _W(const vector<T> &x) {
  for (auto i = x.begin(); i != x.end(); _W(*i++))
    if (i != x.cbegin()) putchar(' ');
}
void W() {}
template <class T, class... U>
void W(const T &head, const U &...tail) {
  _W(head);
  putchar(sizeof...(tail) ? ' ' : '\n');
  W(tail...);
}
int MOD = 1e9 + 7;
void ADD(long long &x, long long v) {
  x = (x + v) % MOD;
  if (x < 0) x += MOD;
}
const int SIZE = 1 << 20;
int to[SIZE];
struct Union_Find {
  int d[1234567], num[1234567];
  void init(int n) {
    for (int i = 0; i < (n); ++i) d[i] = i, num[i] = 1;
  }
  int find(int x) {
    int y = x, z = x;
    while (y != d[y]) y = d[y];
    while (x != y) {
      x = d[x];
      d[z] = y;
      z = x;
    }
    return y;
  }
  bool is_root(int x) { return d[x] == x; }
  bool uu(int x, int y) {
    x = find(x);
    y = find(y);
    if (x == y) return 0;
    if (num[x] > num[y]) swap(x, y);
    num[y] += num[x];
    d[x] = y;
    return 1;
  }
} U;
bool check(int N) {
  U.init(N);
  for (int i = 0; i < (N); ++i) {
    U.uu(i, to[i]);
  }
  for (int i = 0; i < (N); ++i) {
    if (U.num[i] == N) return 1;
  }
  return 0;
}
void solve() {
  int N;
  R(N);
  if (N & 1) {
    W(-1);
    return;
  }
  srand(514);
  while (1) {
    for (int i = 0; i < (N / 2); ++i) {
      to[i] = i * 2 % N;
      to[i + N / 2] = (i * 2 + 1) % N;
      if (rand() & 1) swap(to[i], to[i + N / 2]);
    }
    vector<int> p(N / 2);
    for (int i = 0; i < (N / 2); ++i) p[i] = i;
    while (!check(N)) {
      for (int i = 0; i < (N / 2); ++i) {
        if (U.find(i) != U.find(i + N / 2)) {
          U.uu(i, i + N / 2);
          swap(to[i], to[N / 2 + i]);
        }
      }
    }
    vector<int> res(N + 1);
    int now = 0;
    for (int i = (1); i < (N); ++i) {
      now = to[now];
      res[i] = now;
    }
    W(res);
    return;
  }
}
int main() {
  solve();
  return 0;
}