#abc237b. [abc237_b]Matrix Transposition
[abc237_b]Matrix Transposition
Problem Statement
You are given an -by- matrix .
The element at the -th row from the top and -th column from the left of is .
Let be a -by- matrix whose element at the -th row from the top and -th column from the left equals .
That is, is the transpose of .
Print .
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print in the following format:
Sample Input 1
4 3
1 2 3
4 5 6
7 8 9
10 11 12
Sample Output 1
1 4 7 10
2 5 8 11
3 6 9 12
For example, we have , so the element at the -st row from the top and -nd column from the left of the transpose is .
Sample Input 2
2 2
1000000000 1000000000
1000000000 1000000000
Sample Output 2
1000000000 1000000000
1000000000 1000000000