Jack was bored from his usual routine of studies and he wants to solve a problem on Hackerearth.
The problem is as follows:-
Given a number N denoted the elements in an array.He wants to arrange the elements of an array such that odd positions have sorted elements in ascending order and even positions have sorted elements in descending order. for example, if we have 1 2 3 4 5 then the result will be 1 5 2 4 3.
Please write the code for this problem
Input Input description.
Output
Constraints