Sorting by columns#9566

Sorting by columns

1 second
64 megabytes
Very easy

You are given a two-dimensional array with dimensions n \times m. Your task is to sort each column in descending order, from top to bottom.

Input

The first line of input consists of two integers, and , representing the number of rows and columns, respectively.

The next lines each contain integers, which are the elements of the array.

Output

Print the array after sorting each column in descending order.

Examples

Example 1

Loading
Loading