#C12375. Matrix Transposition
Matrix Transposition
Matrix Transposition
Given an integer matrix, your task is to compute its transpose.
For a matrix \(M\) of size \(m \times n\), its transpose \(M^T\) is defined as a matrix of size \(n \times m\) where \(M^T[i][j] = M[j][i]\). This operation swaps the rows and columns of the original matrix.
The input is provided via standard input and the output should be printed to standard output.
inputFormat
The first line of input contains two integers \(m\) and \(n\) representing the number of rows and columns of the matrix, respectively.
The next \(m\) lines contain \(n\) space-separated integers representing the matrix elements.
outputFormat
Output the transposed matrix. Each row of the transposed matrix should be printed on a separate line with the elements separated by a single space.
## sample3 3
1 2 3
4 5 6
7 8 9
1 4 7
2 5 8
3 6 9
</p>