#include <bits/stdc++.h>
using namespace std;
int i, n, t, m, j, k, l;
bool flag[1100];
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> m;
  pair<int, int> can2[200];
  for (i = 0; i < n; i++) {
    can2[i] = make_pair(0, i);
  }
  for (i = 0; i < m; i++) {
    vector<pair<int, int> > can;
    for (j = 0; j < n; j++) {
      cin >> k;
      can.push_back(make_pair(-k, j));
    }
    sort(can.begin(), can.end());
    can2[can[0].second].first--;
  }
  sort(can2, can2 + n);
  ;
  cout << can2[0].second + 1 << endl;
  return 0;
}
