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

#738. Matrix: Largest value of each row

You are given a matrix of integers. **Largest value of each row**. ### 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
4 4
6 4 7 7
5 1 6 3
-7 -7 1 7
8 -8 -1 7
Output
7
6
7
8
Input
4 4
3 1 -4 7
9 2 9 -1
-5 7 -4 -3
-1 -4 -4 5
Output
7
9
7
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!