#include <iostream>
#include <algorithm>
using namespace std;
struct node
{
double x;
int y;
}b[10000];
int i,j,k,n,m;
double t;
bool cmp(node A,node B)
{
if (A.x>B.x) return 1;
if (A.x<B.x) return 0;
if (A.y<B.y) return 1;
return 0;
}
bool cmpp(node A,node B)
{
if (A.y>B.y) return 1;
return 0;
}
int main()
{
while (cin >> n >> m >>k)
{
memset(b,0,sizeof(b));
for (i=1;i<=n;i++)
for (j=1;j<=m;j++)
{
cin >> t;
b[j].x+=t;
b[j].y=j;
}
sort(b+1,b+m+1,cmp);
sort(b+1,b+k+1,cmpp);
cout << b[1].y;
for (i=2;i<=k;i++)
cout << ' ' << b[i].y;
cout << endl;
}
return 0;
}