#include <bits/stdc++.h>
using namespace std;

int main(){
  int N,M,i,ans=0,c,a[51],b[51],c[51],d[51];
  cin>>N>>M;
  for(i=0;i<N;i++){
    cin>>a[i]>>b[i];
  }
  for(i=0;i<M;i++){
    cin>>c[i]>>d[i];
  }
  for(int j=0;j<N;j++){
    c=100000001;
      ans=0;
  for(i=0;i<N;i++){
   if(c<abs(a[i]-c[i])+abs(b[i]-d[i])){
     ans=i+1;
     c=abs(a[i]-c[i])+abs(b[i]-d[i]);
   }
  }
    cout<<ans<<endl;
  }
}