#include <bits/stdc++.h>
using namespace std;
const int MaxN = 100 + 10;
int N, M, ans;
long long m, wins[MaxN], MAX;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  MAX = -1;
  cin >> N >> M;
  for (int i = 0; i < M; i++) {
    MAX = -1;
    ans = -1;
    for (int j = 0; j < N; j++) {
      cin >> m;
      if (m > MAX) {
        if (ans >= 0) wins[ans]--;
        MAX = m;
        ans = j;
        wins[ans]++;
      }
    }
  }
  MAX = -1;
  for (int i = 0; i < N; i++)
    if (wins[i] > MAX) {
      MAX = wins[i];
      ans = i + 1;
    }
  cout << ans;
  return 0;
}
