Problem

1 /8


Changing the line with the maximum

Problem

In a NxM matrix, replace with the value -1 all the elements of those rows that contain the maximum element.

Input
The first line contains two numbers N and M (\(0 < N,M <= 10\)). Next come N lines of M numbers each - matrix elements (each element is less than 100).

Imprint
Output the modified matrix. For each element in the output, allocate exactly 3 characters (familiar spaces). Each number must be followed by a space character.
 
Example
# Input Output
1 5 5
15 68 54 79 89 
91 57 21 70 24 
14 22 5 26 76 
51 59 92 98 96 
50 62 50 58 1 
 15 68 54 79 89
 91 57 21 70 24
 14 22 5 26 76
 -1 -1 -1 -1 -1
 50 62 50 58 1