atcoder#ABC237B. [ABC237B] Matrix Transposition
[ABC237B] Matrix Transposition
Score : points
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:
4 3
1 2 3
4 5 6
7 8 9
10 11 12
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 .
2 2
1000000000 1000000000
1000000000 1000000000
1000000000 1000000000
1000000000 1000000000