#include <bits/stdc++.h>
using namespace std;
int main() {
  long long v[200];
  long long n, m, a, may, pos;
  while (cin >> n >> m) {
    for (int i = 0; i < 101; i++) v[i] = 0;
    for (int i = 0; i < m; i++) {
      pos = -1;
      may = -1;
      for (int j = 0; j < n; j++) {
        cin >> a;
        if (a > may) {
          may = a;
          pos = j;
        }
      }
      v[pos] = v[pos] + 1;
    }
    may = -1;
    pos = -1;
    for (int i = 0; i < n; i++) {
      if (v[i] > may) {
        may = v[i];
        pos = i;
      }
    }
    cout << pos + 1 << endl;
  }
  return 0;
}
