Transpose the matrix#137

Transpose the matrix

1 second
128 megabytes
Very easy (≈850)

Given matrix A. Transpose it.

Let B be the transposed matrix A. Then B[ij] = A[ji].

prb9537.gif

Input

The first line contains the size of the matrix n and m (1 ≤ n, m ≤ 100). Each of the next n lines contains m integers and describe the matrix A.

Output

Print the transposed matrix A: m lines, each with n integers.

Examples

Example 1

Loading
Loading