#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, M;
  cin >> N >> M;
  int a[105], b[105], c[105], d[105];
  for (int i = 0; i < N; i++) {
    cin >> a[i] >> b[i];
  }
  for (int i = 0; i < M; i++) {
    cin >> c[i] >> d[i];
  }
  for (int i = 0; i < N; i++) {
    int kyori = INT_MAX;
    int index = 0;
    for (int i = 0; i < M; i++) {
      int z;
      z = abs((a[i] - c[i]) + (b[i] - d[i]));
      if (z < kyori) {
        kyori = z;
        index = i;
      }
      cout << i + 1 << endl;
    }
    return 0;
  }
}
