11687 - 231001_11/23_practice10-1   

Description

  • Input two positive integers n, m and a matrix A, where A is an n×m matrix with integer elements. Print the transpose of matrix A: AT.

  • AT: The i th row, j th column element of AT is the j th row, i th column element of A: [AT]ij=Aji

Input

  • Input: Two positive integers n, m and a matrix A

  • Input format: See the sample I/O

Output

  • Output: The transpose of A.

  • Output format:

  1. There is a space after each number, including the last number in each row, and change a new line after each n elements.

  2. Change a new line at the end.

Sample Input  Download

Sample Output  Download

Tags




Discuss