eolymp
bolt
Try our new interface for solving problems
Problems

Largest in each column

Largest in each column

You are given a two-dimensional array of size n * m. Find the largest element in each column.

Input

The first line contains two numbers n and m - the number of rows and columns, respectively. Then n lines of m numbers are given - the elements of array.

All numbers do not exceed 100 by absolute value.

Output

Print m numbers in one line - the answer to the problem.

Time limit 1 second
Memory limit 128 MiB
Input example #1
4 5
1 3 2 4 5
4 2 7 6 5
9 2 3 5 1
7 8 1 7 2
Output example #1
9 8 7 7 5
Author Жуковский Сергей Станиславович
Source Серія задач "Абетка програмування"