#include<bits/stdc++.h>
using namespace std;
int n, r, q;
struct node{
int x;
int y;
int z;
}a[10000001];
node b[3000000],c[3000000];
bool cmp(node a, node b){
if(a.x!=b.x)
return a.x>b.x;
else
return a.z<b.z;
}
int main(){
scanf("%d%d%d",&n,&r,&q);
n*=2;
for(int i=1;i<=n;i++)
scanf("%d",&a[i].x);
for(int i=1;i<=n;i++)
scanf("%d",&a[i].y),a[i].z=i;
sort(a+1,a+1+n,cmp);
for(int i=1;i<=r;i++){
int i2=0, j2=0;
for(int i=2;i<=n;i+=2)
if(a[i].y>a[i-1].y)a[i].x++,b[++i2]=a[i],c[j2]=a[i-1];
else a[i-1].x,b[++i2]=a[i-1],c[++j2]=a[i];
merge(b+1,b+1+i2,c+1,c+1+j2,a+1,cmp);
}
printf("%d",a[q].z);
return 0;
}