Transpose

Little Spiderman is in the 10th grade. He learns about matrixes and their transpose. His homework is to find the transpose matrix of a given matrix, but he doesn't know how to do this, since he hasn't been bitten by the radioactive spider yet. Let's help him do the homework.

Input

The first line of input contains two integers N and M.
The following N lines contain M space-separated values each, representing the original matrix.

Output

The output should contain M lines of N space-separated values, representing the transpose matrix.

Constraints

  • 1 ≤ N, M ≤ 1000
  • 1 ≤ any matrix value ≤ 32768

Sample

InputOutput
2 3
4 8 15
16 23 423
4 16
8 23
15 423
Questions?

Sponsors Gold