二維陣列反轉
Description
請將使用者給定的 �∗�n∗m 的二維陣列進行轉置(行和列交換)。
Please transpose the �∗�n∗m two-dimensional array given by the user (exchange rows and columns).
Input
輸入包含以下資訊:
第一行包含 n,m(5≤n,m≤10) 代表使用者輸入的二維陣列的行與列。
�,�(5≤�,�≤10)
接下來的輸入則代表使用者輸入的二維陣列。
The input contains the following information:
The first line contains n,m(5≤n,m≤10) which represents the rows and columns of the two-dimensional array entered by the user.
�,�(5≤�,�≤10)
The next input represents a two-dimensional array of user input.
Output
請輸出轉置後的二維陣列。
Please output the transposed two-dimensional array.
Sample Input 1
3 2
1 2
3 4
5 6
Sample Output 1
1 3 5
2 4 6
Sample Input 2
10 10
1 2 3 4 5 6 7 8 9 0
1 2 3 4 5 6 7 8 9 0
1 2 3 4 5 6 7 8 9 0
1 2 3 4 5 6 7 8 9 0
1 2 3 4 5 6 7 8 9 0
9 8 7 6 5 4 3 2 1 0
9 8 7 6 5 4 3 2 1 0
9 8 7 6 5 4 3 2 1 0
9 8 7 6 5 4 3 2 1 0
9 8 7 6 5 4 3 2 1 0