#include<bits/stdc++.h>
using namespace std;
int n,m,a,b;
int h[100005];
struct song
{
int id;
int tot;
}s[100005];
bool cmp(song a,song b)
{
return a.tot>b.tot;
}
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
cin>>n>>m>>a>>b;
int max_id,max_s=-1;
for(int i=1;i<=a;i++)
{
s[i].id=i;
if(i==b)
{
for(int j=1;j<=n;j++)
{
int x;
cin>>x;
if(x>max_s)
{
max_s=x;
max_id=j;
}
s[j].tot+=x;
}
}
else
{
for(int j=1;j<=n;j++)
{
int x;
cin>>x;
s[j].tot+=x;
}
}
}
sort(s+1,s+a+1,cmp);
int flag=0;
for(int i=1;i<=m;i++)
{
if(max_id==s[i].id)
{
flag=1;
break;
}
}
if(flag==0)
{
for(int i=1;i<m;i++)
{
cout<<s[i].id<<" ";
}
cout<<max_id;
return 0;
}
else
{
cout<<max_id<<" ";
for(int i=1;i<m;i++)
{
cout<<s[i].id<<" ";
}
return 0;
}
return 0;
}