Teodor wakes up in the desert alone, helpless and frightened. Before him appears “Fata Morgana“ which extends two tightly held fists and has him choose one. Choosing the left fist “Fata Morgana“ tells him “Congratulations, you avoided certain death. Solve for me the following task and I shall guide you away from the desert“.
You are given an array of positive integers where is even. You can reorder the integers however you want. What is the largest value for after reordering?
Print the reordered array.
Teodor, unable to think straight turns to you (seems he wasn’t alone after all) and asks you to quickly help him.
Input
The first line will contain . (), is even.
The following line will contain positive integers ()
For tests worth points, ().
Output
You will only output one line with the integers reordered (or not).
If there are multiple answers print the smallest lexicographical solution.
An array is considered lexicographically smaller than if or there exists a where and .
Example
stdin
4
3 2 1 1
stdout
1 2 1 3
Explanation
. This is the largest value you can achieve given this array.