Competitions

# Week 12: February 8 - 14

# Transpose the matrix

Given matrix **A**. Transpose it.

Let **B** be the transposed matrix **A**. Then `B`

= _{ij}`A`

._{ji}

#### Input

The first line contains the size of the matrix **n** and **m** (**1** ≤ **n**, **m** ≤ **100**). Each of the next **n** lines contains **m** integers and describe the matrix **A**.

#### Output

Print the transposed matrix **A**: **m** lines, each with **n** integers.

Input example #1

3 2 1 2 3 4 5 6

Output example #1

1 3 5 2 4 6