#B2106. Matrix Transposition
Matrix Transposition
Matrix Transposition
Given an matrix (A), compute its transpose (A^T).
The transpose is obtained by swapping the rows and columns. That is, the element at position (a_{ij}) in (A) becomes the element at position (a_{ji}) in (A^T).
inputFormat
The first line contains two integers (n) and (m) representing the number of rows and columns respectively. Each of the next (n) lines contains (m) space-separated integers.
outputFormat
Output the transpose of the given matrix. Each row of the transposed matrix should be printed on a new line with its elements separated by a space.
sample
2 2
1 2
3 4
1 3
2 4
</p>