#C11282. Matrix Transposition
Matrix Transposition
Matrix Transposition
Given an \(n \times m\) matrix, your task is to compute its transpose. The transpose of a matrix \(A\), denoted as \(A^T\), is defined as:
\(A^T[i][j] = A[j][i]\) for all valid indices.
You are required to read the input from stdin and write the output to stdout.
inputFormat
The first line contains two integers \(n\) and \(m\) separated by a space, representing the number of rows and columns of the matrix respectively.
Each of the next \(n\) lines contains \(m\) integers separated by spaces, representing the elements of the matrix.
outputFormat
Output the transposed matrix of size \(m \times n\). Each of the \(m\) lines should contain \(n\) integers separated by a space.
## sample2 3
1 2 3
4 5 6
1 4
2 5
3 6
</p>