e-olymp
favorite We need a little bit of your help to keep things running, click on this banner to learn more
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 (1n, m100) - 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 lone print the numbers of rows that contain minimal element in increasing order.

Time limit 1 second
Memory limit 128 MiB
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
Author Zhukovskiy Sergiy Stanislavovych
Source "ABC programming"