Transpose the matrix
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Given matrix A. Transpose it.
Let B be the transposed matrix A. Then B[ij]
= A[ji]
.
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
Input #1
Answer #1
Submissions 5K
Acceptance rate 55%