give m x n matrix distinct number return lucky number matrix ordera lucky number element matrix minimum element row maximum column example 1input matrix 37891113151617output 15explanation 15 lucky number minimum row maximum columnexample 2input matrix 11042938715161712output 12Explanation 12 lucky number minimum row maximum columnexample 3input matrix 7812Output 7Explanation 7 lucky number minimum row maximum column Constraintsm matlengthn matilength1 n m 501 matrixij 105All element matrix distinct