Given array of integers. Rearrange its elements so that to get a max-heap.
First line contains number of elements n (n≤1000). Second line contains n integers, no more than 106 by absolute value.
Print array that corresponds to max-heap.