#include <iostream>
#include <algorithm>
#include <cstring>
using namespace std;
#define int long long
#define TRACE 1
#define tc TRACE && cout
#define el cout << '\n'
const int MAX = 1e5 * 2 + 10;
struct Node{
int s, w, i;
}b[MAX], a[MAX], x[MAX], y[MAX];
int n, r, q;
int cnt;
bool cmp(Node a, Node b){
if(a.s == b.s){
return a.i < b.i;
}
return a.s > b.s;
}
void merge(){
int i = 1;
int j = 1;
int k = 0;
while(i <= n/2 && j <= n/2){
k++;
if(x[i].s >= y[j].s){
b[k] = x[i];
i++;
}else{
b[k] = y[j];
j++;
}
}
while(i <= n/2){
k++;
b[k] = x[i];
i++;
}
while(j <= n/2){
k++;
b[k] = y[j];
j++;
}
for(int i=1; i<=k; i++){
a[i] = b[i];
}
return;
}
signed main()
{
cin >> n >> r >> q;
n *= 2;
for(int i=1; i<=n; i++){
a[i].i = i;
cin >> a[i].s;
}
for(int i=1; i<=n; i++){
cin >> a[i].w;
}
sort(a+1, a+n+1, cmp);
while(r--){
cnt = 0;
memset(b, 0, sizeof(b));
memset(x, 0, sizeof(x));
memset(y, 0, sizeof(y));
for(int i=1; i<=n; i+=2){
if(a[i].w >= a[i+1].w){
a[i].s++;
}else{
a[i+1].s++;
}
++cnt;
x[cnt] = a[i];
y[cnt] = a[i+1];
}
merge();
}
sort(a+1, a+n+1, cmp);
cout << a[q].i;
el;
return 0;
}