#abc237b. [abc237_b]Matrix Transposition

[abc237_b]Matrix Transposition

Problem Statement

You are given an HH-by-WW matrix AA.
The element at the ii-th row from the top and jj-th column from the left of AA is Ai,jA_{i,j}.

Let BB be a WW-by-HH matrix whose element at the ii-th row from the top and jj-th column from the left equals Aj,iA_{j, i}.
That is, BB is the transpose of AA.

Print BB.

Constraints

  • 1leqH,Wleq1051\\leq H,W \\leq 10^5
  • HtimesWleq105H \\times W \\leq 10^5
  • 1leqAi,jleq1091 \\leq A_{i,j} \\leq 10^9
  • All values in input are integers.

Input

Input is given from Standard Input in the following format:

HH WW A1,1A_{1,1} A1,2A_{1,2} ldots\\ldots A1,WA_{1,W} A2,1A_{2,1} A2,2A_{2,2} ldots\\ldots A2,WA_{2,W} vdots\\vdots AH,1A_{H,1} AH,2A_{H,2} ldots\\ldots AH,WA_{H,W}

Output

Print BB in the following format:

B1,1B_{1,1} B1,2B_{1,2} ldots\\ldots B1,HB_{1,H} B2,1B_{2,1} B2,2B_{2,2} ldots\\ldots B2,HB_{2,H} vdots\\vdots BW,1B_{W,1} BW,2B_{W,2} ldots\\ldots BW,HB_{W,H}


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 A2,1=4A_{2,1}=4, so the element at the 11-st row from the top and 22-nd column from the left of the transpose BB is 44.


Sample Input 2

2 2
1000000000 1000000000
1000000000 1000000000

Sample Output 2

1000000000 1000000000
1000000000 1000000000