#C1333. Secure Network Pairing

    ID: 42856 Type: Default 1000ms 256MiB

Secure Network Pairing

Secure Network Pairing

You are given an integer n which represents the number of agents in a spy network. A secure network configuration is defined by pairing agents such that the first agent is paired with the second, the third with the fourth, and so on. In other words, for each consecutive pair (i, i+1), the pairing should be (i+1, i).

If n is odd, it is impossible to create a secure pairing, and you should return -1.

Formally, if \(n\) is even, output a permutation \(P\) of \([1, 2, \dots, n]\) satisfying:

\[ P_{2k-1} = 2k, \quad P_{2k} = 2k-1, \quad\text{for } k = 1, 2, \dots, \frac{n}{2}, \]

Otherwise, output -1.

inputFormat

The input consists of a single integer n (1 \(\leq\) n \(\leq\) 106), provided via standard input.

outputFormat

If a secure pairing is possible, output the paired configuration as space-separated integers in one line. If it is not possible, output -1.

## sample
4
2 1 4 3

</p>