You are given a rectangular grid of integers with r rows and c columns. Produce its transpose: a grid with c rows and r columns where the value in row i, column j of the output equals the value in row j, column i of the input. In other words, the first output row is the first input column (top to bottom), the second output row is the second input column, and so on.
Input format
Line 1: two integers r and c separated by a space.
Next r lines: each contains c space-separated integers, giving the grid row by row.
Output format
Print c lines. Line i (1-indexed) contains r space-separated integers: the i-th column of the input grid, from top to bottom.
Constraints
- 1 ≤ r ≤ 200
- 1 ≤ c ≤ 200
- -1000000 ≤ each grid value ≤ 1000000