B. Build Permutation
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Given an integer array $$$a$$$ of length $$$n$$$, find a permutation $$$\pi$$$ of $$$\{1,2,\ldots,n\}$$$ such that $$$ a_i+a_{\pi_i}=a_j+a_{\pi_j}$$$ for all $$$i,j\in\{1,2,\ldots,n\}$$$ or report none such permutation exists.

Input

The first line of input contains a single integer $$$n$$$ ($$$1\leq n\leq 2\cdot 10^5$$$)  — the length of the array.

The second line of input contains $$$n$$$ integers $$$a_1$$$, $$$a_2$$$, $$$\ldots$$$, $$$a_n$$$ ($$$0\leq a_i\leq 10^9$$$)  — elements of the array.

Output

If no such permutation exists, print $$$-1$$$.

Otherwise, on the first line print $$$\pi_1, \pi_2, \ldots, \pi_n$$$. If several such permutations exist, you can output any of them.

Examples
Input
5
4 2 5 1 3
Output
2 1 4 3 5 
Input
3
2 2 3
Output
-1
Note

In the first sample, we have:

  • $$$a_1 + a_{\pi_1} = a_1 + a_2 = 4 + 2 = 6$$$
  • $$$a_2 + a_{\pi_2} = a_2 + a_1 = 2 + 4 = 6$$$
  • $$$a_3 + a_{\pi_3} = a_3 + a_4 = 5 + 1 = 6$$$
  • $$$a_4 + a_{\pi_4} = a_4 + a_3 = 1 + 5 = 6$$$
  • $$$a_5 + a_{\pi_5} = a_5 + a_5 = 3 + 3 = 6$$$

In the second sample, no such permutation exists.