#include <bits/stdc++.h>
int main() {
  long long N, M, a[50], b[50], c[50], d[50], S[50][50], i, j, ans;
  scanf("%lld%lld", &N, &M);
  for (i = 0; i < N; i++) scanf("%lld%lld", &a[i], &b[i]);
  for (i = 0; i < M; i++) scanf("%lld%lld", &c[i], &d[i]);
  for (i = 0; i < N; i++) {
    S[i][0] = abs(a[i] - c[0]) + abs(b[i] - d[0]);
    ans = 0;
    for (j = 1; j < N; j++) {
      S[i][j] = abs(a[i] - c[j]) + abs(b[i] - d[j]);
      if (S[i][j - 1] > S[i][j]) {
        S[i][j - 1] = S[i][j];
        ans = j;
      }
    }
    printf("%lld\n", ans + 1);
  }
}
