Perfect Permutation

来源:互联网 发布:淘宝整点秒杀是真的吗 编辑:程序博客网 时间:2024/06/07 05:22

Perfect Permutation
Crawling in process...Crawling failedTime Limit:2000MSMemory Limit:262144KB 64bit IO Format:%I64d & %I64u

Description

A permutation is a sequence of integers p1, p2, ..., pn, consisting ofn distinct positive integers, each of them doesn't exceedn. Let's denote the i-th element of permutation p aspi. We'll call numbern the size of permutation p1, p2, ..., pn.

Nickolas adores permutations. He likes some permutations more than the others. He calls such permutations perfect. Aperfect permutation is such permutation p that for any i (1 ≤ i ≤ n) (n is the permutation size) the following equations holdppi = i andpi ≠ i. Nickolas asks you to print any perfect permutation of sizen for the given n.

Input

A single line contains a single integern (1 ≤ n ≤ 100) — the permutation size.

Output

If a perfect permutation of sizen doesn't exist, print a single integer -1. Otherwise printn distinct integers from 1 to n, p1, p2, ..., pn — permutationp, that is perfect. Separate printed numbers by whitespaces.

Sample Input

Input
1
Output
-1
Input
2
Output
2 1 
Input
4
Output
2 1 4 3 

Sample Output

102410240792

Note

In the second sample, if Alice doesn't pick any mushrooms from the 5-th mountain. She can give (512+512+0)=1024 grams of mushrooms to Sunny, Lunar and Star. Marisa won't steal any mushrooms from her as she has exactly 1 kilograms of mushrooms in total.

In the third sample, there are no three bags whose total weight is of integral kilograms. So Alice must leave all the five bags and enter the forest with no mushrooms.

In the last sample:

  • Giving Sunny, Lunar and Star: (208+308+508)=1024
  • Stolen by Marisa: ((708+1108)-1024)=792

Hint


真心没看懂意思。。。。。。。


#include<stdio.h> int main() {     int n;     int i,j;     scanf("%d",&n);     if(n%2==1) printf("-1\n");     else     {         for(i=1;i<=n/2;i++)         {             printf("%d %d ",i*2,i*2-1);         }         printf("\n");     }     return 0; }