Codeforces Round 144 (Div. 2)
A
Perfect Permutation
Codeforces
800
原题
←B →
翻译中…

A permutation is a sequence of integers $*p*_{1}, *p*_{2}, ..., *p*_{*n*}$, consisting of $*n*$ distinct positive integers, each of them doesn't exceed $*n*$. Let's denote the $*i*$-th element of permutation $*p*$ as $*p*_{*i*}$. We'll call number $*n*$ the size of permutation $*p*_{1}, *p*_{2}, ..., *p*_{*n*}$.

翻译中…

Nickolas adores permutations. He likes some permutations more than the others. He calls such permutations perfect. A perfect permutation is such permutation $*p*$ that for any $*i*$ $(1 ≤ *i* ≤ *n*)$ ($*n*$ is the permutation size) the following equations hold $*p*_{*p*_{*i*}} = *i*$ and $*p*_{*i*} ≠ *i*$. Nickolas asks you to print any perfect permutation of size $*n*$ for the given $*n*$.

翻译中…

Input

翻译中…

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

翻译中…

Output

翻译中…

If a perfect permutation of size $*n*$ doesn't exist, print a single integer -1. Otherwise print $*n*$ distinct integers from 1 to $*n*$, $*p*_{1}, *p*_{2}, ..., *p*_{*n*}$ — permutation $*p*$, that is perfect. Separate printed numbers by whitespaces.

翻译中…

样例

Input #1
1
Output #1
-1
InputCopy OutputCopy
Input #2
2
Output #2
2 1
InputCopy OutputCopy
Input #3
4
Output #3
2 1 4 3
InputCopy OutputCopy
题目信息
题号
233A
时间限制
2 s
内存限制
256 MB
标签
模拟
数学

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。