Given an array of integers. Rearrange its elements to form a max-heap.
The first line contains the number of elements in the array n~(n \le 1000).
The second line contains integers, each with an absolute value not exceeding 10^6.
Print the rearranged array representing a max-heap. If there are multiple solutions, print any one of them.

Example 1