#include <stdio.h>
int main()
{
   int n,m,b[1000],a[1000];
   int sum[1000]={0};
   scanf("%d %d",&n,&m);
   for(int i=0;i<=n-1;i++){
     scanf("%d",&a[i]);
   }
   for(int j=0;j<=m-1;j++){
     scanf("%d",&b[j]);
   }
   for(int j=0;j<=m-1;j++){
     for(int i=0;i<=n-1;i++){
        if(b[j]>=a[i]) {sum[i]=sum[i]+1;break;}
     }
   }
   int max=-1;
   for(int k=0;k<=n-1;k++){
      if(sum[k]>=max) max=sum[k];
   }
   for(int i=0;i<=n-1;i++){
     if(sum[i]==max) printf("%d\n",i+1);
   }
   return 0;
}
#include <bits/stdc++.h>
using namespace std;

#define FOR(i,a,b) for(int i=(a);i<(int)(b);i++)
#define rep(i,n) FOR(i,0,n)
#define ZERO(a) memset(a,0,sizeof(a))
#define pb push_back

int rank[1020];

int main() {
    int n, m;
    ZERO(rank);
    cin >> n >> m;
    vector<int> v;
    rep(i,n) {
        int cost; scanf("%d",&cost);
        v.pb(cost);
    }

    rep(i,m) {
        int c; scanf("%d",&c);
        rep(j,n) if(c >= v[j]) {
            rank[j+1]++; break;
        }
    }

    int ans = 0, ma = 0;
    rep(i,1001) if(ma < rank[i]) {
        ma = rank[i];
        ans = i;
    }
    cout << ans << "\n";

    return 0;
}