#include <bits/stdc++.h>
using namespace std;
int city_win[103], v[103];
void Do() {
  int n, m;
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    int mx = -INT_MAX;
    for (int j = 1; j <= n; j++) {
      cin >> v[j];
      mx = max(mx, v[j]);
    }
    for (int j = 1; j <= n; j++) {
      if (mx == v[j]) {
        city_win[j]++;
        break;
      }
    }
  }
  int mx = -INT_MAX;
  int ans = 0;
  for (int i = 1; i <= n; i++) mx = max(mx, city_win[i]);
  for (int i = 1; i <= n; i++)
    if (mx == city_win[i]) ans++;
  for (int i = 1; i <= n; i++)
    if (mx == city_win[i]) {
      cout << i << endl;
      return;
    }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  Do();
  return 0;
}
