Problems
Rows with minimal elements
Rows with minimal elements
Two dimensional array of size n * m is given. Find the rows that contain the minimal element.
Input
First line contains two numbers n and m (1 ≤ n, m ≤ 100) - the number of rows and the number of columns. Next given n rows with m integers - the array elements. All numbers do not exceed 100 by absolute value. The numbering of elements starts with 1.
Output
In one line print the numbers of rows that contain minimal element in increasing order.
Input example #1
4 5 2 5 3 1 4 3 5 2 3 4 4 6 1 2 3 4 5 6 7 7
Output example #1
1 3
Input example #3
10 10 12 13 23 11 21 11 11 11 11 11 11 21 15 11 14 18 11 19 11 11 12 31 61 11 31 17 11 67 11 11 13 14 17 11 12 16 11 11 11 11 14 13 81 11 13 51 11 11 35 44 75 22 19 11 14 14 11 11 11 11 16 34 11 11 15 31 11 11 11 11 17 14 11 11 16 12 11 11 11 11 21 15 11 11 11 11 11 11 11 11 16 34 11 11 15 31 11 11 11 11
Output example #3
1 2 3 4 5 6 7 8 9 10