CodeLab Academy 📞 9936 6696
← List Python · Level 8: Nested loops Code · 80 points ← #736 #738 →

#737. Matrix: Transposed matrix

You are given a matrix of integers. **Transposed matrix**. ### Input The first line has n m (the number of rows and columns), each of the next n lines has m integers. ### Output The answer.

Examples

Input
5 3
0 -3 -2
1 -8 -7
-1 6 -8
-4 9 8
-5 5 -7
Output
0 1 -1 -4 -5
-3 -8 6 9 5
-2 -7 -8 8 -7
Input
3 4
-6 0 8 4
-2 6 2 -2
-2 5 2 5
Output
-6 -2 -2
0 6 5
8 2 2
4 -2 5

💡 You can solve it with Python, JavaScript or blocks. Read the input line by line with input(). Don't print a question (like input("Number: ")). Print exactly what the output asks for, nothing more.

🔒 You can solve the first 3 problems without an account. Sign up for free to solve this one!