#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, a[100], k = 1, b[100], c[100], d[100], x[100];
  cin >> n >> m;
  for (long long i = 0; i < n; i++) {
    cin >> a[i] >> b[i];
  }
  for (long long j = 0; j < m; j++) {
    cin >> c[j] >> d[j];
  }
  for (long long i = 0; i < n; i++) {
    k = 0;
    for (long long j = 0; j < m; j++) {
      x[j] = abs(a[i] - c[j]) + abs(b[i] - d[j]);
    }
    m = x[0];
    for (long long j = 0; j < m; j++) {
      if (m > x[j]) {
        k = j;
        m = x[j];
      }
    }
    cout << k + 1 << " ";
    cout << endl;
  }
}
