HZNUOJ

Little Sub and Traveling

Tags:
Time Limit:  1 s      Memory Limit:   256 MB
Submission:180     AC:39     Score:97.12

Description

Little Sub lives in a country with n cities A[0..n − 1]. He loves traveling very much.

It is Feb.14th, the Valentine Day. Little Sub decides to travel around the country with his girl friend.

Little Sub lives in A[0] and he wants to visit each city exactly once and go back to A[0] eventually. However, Little Sub has made a rule for his journey: Suppose he is in city A[i], the next city he is about to visit must be either A[(i ∗ 2)%n] or A[(i ∗ 2 + 1)%n].

Please help him find a possible route. If there are multiple answers, please give the one with the maximum alphabet order.

We say route A is larger than route B in the alphabet order when there exists i that A[i] > B[i]&A[1..i − 1] = B[1..i − 1] meets.

Input

The first line contains a positive integers n(2 ≤ n ≤ 10000).

Output

If there exists a legal route, please output n+1 integer separated by spaces in a single line, indicating the route.

If there is no possible route, please output −1 instead.

Samples

input
4
output
0 1 3 2 0
input
3
output
-1

Author

CHEN, Jingbang