#include <bits/stdc++.h>
using namespace std;
int dist(int x, int y, int a, int b) {
  a = -a;
  b = -b;
  return abs(x + a) + abs(y + b);
}
int main() {
  int n, m, x[100], y[100], a[100], b[100];
  int vis[100];
  for (int i = 0; i < 100; i++) vis[i] = 0;
  cin >> n >> m;
  for (int i = 0; i < n; i++) cin >> x[i] >> y[i];
  for (int i = 0; i < m; i++) cin >> a[i] >> b[i];
  for (int i = 0; i < n; i++) {
    int mini = 1e9, pos = -1;
    for (int j = 0; j < m; j++) {
      if (!vis[j]) {
        int dis = dist(x[i], y[i], a[j], b[j]);
        if (dis < mini) mini = dis, pos = j;
      }
    }
    vis[pos] = 1;
    cout << pos + 1 << endl;
  }
  return 0;
}
