N numbers were converted into their respective Binary form of M length and arranged in an NxM matrix.
Your task is to find the index of row (1 based indexing) which contains the binary number with maximum value. If multiple rows have maximum value then print the row with minimum index.
Input:
The first line contains two space separated integers N and M, denoting number of rows and number of columns in matrix respectively.
Each of the next N lines contains a number in binary form.
Output:
Print the index of row in a single line.
Constraints:
\(1 \le N,M \le 10^3\)
\(0 \le mat[i][j] \le 1\)
1st row value = 23 *1 + 22 *0 + 21 *1 + 20 *0 = 10
2nd row value = 23 *0 + 22 *1 + 21 *0 + 20 *0 = 4
3rd row value = 23 *0 + 22 *0 + 21 *1 + 20 *0 = 2
4th row value = 23 *0 + 22 *0 + 21 *1 + 20 *1 = 3