#include"stdio.h" #include"string.h" #include"stdlib.h" struct node { double sum; int num; }aa[1000]; int c(const void*a,const void*b) { return *(int*)b-*(int*)a; } int cmp(const void*a,const void*b) { struct node *c,*d; c=(struct node*)a; d=(struct node*)b; if(c->sum!=d->sum) return d->sum-c->sum; else return c->num-d->num; } double a[1000][1000]; int main() { int n,m,k; int i,j; int b[1000]; while(scanf("%d%d%d",&n,&m,&k)!=EOF) { memset(aa,0,sizeof(aa)); for(i=1;i<=n;i++) { for(j=1;j<=m;j++) { scanf("%lf",&a[i][j]); aa[j].sum+=a[i][j]; aa[j].num=j; } } qsort(aa,m+1,sizeof(aa[0]),cmp); for(i=0;i<k;i++) b[i]=aa[i].num; qsort(b,k,sizeof(b[0]),c); for(i=0;i<k-1;i++) printf("%d ",b[i]); printf("%d\n",b[i]); } return 0; }