#include<iostream>#include<vector>usingnamespace std;int n, m;intmain(){
cin >> n >> m;
vector<vector<int>>box(n,vector<int>(m,0));for(auto&it : box){for(auto&jt : it){
cin >> jt;}}for(size_t i =0; i < box.size(); i++){int index =0;for(size_t j =0; j < box.size(); j++){// select boxbool flag =1;for(size_t k =0; k < box[0].size(); k++){if(box[i][k]>= box[j][k]){
flag =0;break;}}if(flag){
index = j +1;break;}}
cout << index << endl;}return0;}