#UnknownID8. JIXMPII5J0xE7UV#!/|
JIXMPII5J0xE7UV#!/|
Statement
Danang and Darto are classmates. They are given homework to create a permutation of integers from to . Danang has completed the homework and created a permutation of integers. Darto wants to copy Danang's homework, but Danang asks Darto to change it up a bit so it does not look obvious that Darto copied.
The difference of two permutations of integers and , denoted by , is the sum of the absolute difference of and for all . In other words, . Darto would like to create a permutation of integers that maximizes its difference with . Formally, he wants to find a permutation of integers such that for all permutation of integers .
Darto needs your help! Since the teacher giving the homework is lenient, any permutation of integers is considered different with if the difference of and is at least . Therefore, you are allowed to return any permutation of integers such that .
Of course, you can still return if you want, since it can be proven that for any permutation and . This also proves that there exists a solution for any permutation of integers . If there is more than one valid solution, you can output any of them.
Format
Input
Input begins with a line containing an integer: ( ) representing the size of Danang's permutation. The next line contains integers: ( ) representing Danang's permutation. It is guaranteed that all elements in are distinct.
Output
Output in a line integers (each separated by a single space) representing the permutation of integers such that . As a reminder, all elements in the permutation must be between to and distinct.
Sample
4
1 3 2 4
4 2 3 1
2
2 1
1 2
相关
在下列比赛中: