#C244. Transpose Matrix

    ID: 45756 Type: Default 1000ms 256MiB

Transpose Matrix

Transpose Matrix

You are given a matrix of size \(R \times C\). Your task is to compute the transpose of the matrix. The transpose \(A^T\) of a matrix \(A\) is defined as:

\(A^T_{ij} = A_{ji}\)

In other words, the rows of the original matrix become the columns of the transposed matrix.

Note: You need to read the input from stdin and output the result to stdout.

inputFormat

The first line contains two space-separated integers \(R\) and \(C\), representing the number of rows and columns of the matrix respectively.

Then \(R\) lines follow, each containing \(C\) space-separated integers representing the elements of the matrix.

outputFormat

Output the transposed matrix with \(C\) lines. Each line contains \(R\) space-separated integers.

## sample
2 3
1 2 3
4 5 6
1 4

2 5 3 6

</p>