You are given a two-dimensional array of size n⋅m. Find the maximum element in each line, and find the minimum among the maximum elements.
The first line contains two integers n and m — the number of rows and columns. Then n lines of m integers are given — the elements of array.
All numbers do not exceed 100 by absolute value.
Print one number — the answer to the problem.