#include <bits/stdc++.h>
using namespace std;
template <typename T0, typename T1>
std::ostream& operator<<(std::ostream& os, const map<T0, T1>& v) {
  for (typename map<T0, T1>::const_iterator p = v.begin(); p != v.end(); p++) {
    os << p->first << ": " << p->second << " ";
  }
  return os;
}
template <typename T0, typename T1>
std::ostream& operator<<(std::ostream& os, const pair<T0, T1>& v) {
  os << v.first << ": " << v.second << " ";
  return os;
}
template <typename T>
std::ostream& operator<<(std::ostream& os, const vector<T>& v) {
  for (int i = 0; i < (int)v.size(); i++) {
    os << v[i] << " ";
  }
  return os;
}
template <typename T>
std::ostream& operator<<(std::ostream& os, const set<T>& v) {
  vector<T> tmp(v.begin(), v.end());
  os << tmp;
  return os;
}
template <typename T>
std::ostream& operator<<(std::ostream& os, const deque<T>& v) {
  vector<T> tmp(v.begin(), v.end());
  os << tmp;
  return os;
}
template <typename T>
std::ostream& operator<<(std::ostream& os, const vector<vector<T>>& v) {
  for (int i = 0; i < (int)v.size(); i++) {
    os << v[i] << endl;
  }
  return os;
}
template <typename T>
void maxUpdate(T& a, T b) {
  a = max(a, b);
}
template <typename T>
void minUpdate(T& a, T b) {
  a = min(a, b);
}
string YN(bool v) { return v ? "Yes" : "No"; }
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  long long N, M, W, H;
  string s;
  while (cin >> N >> M) {
    vector<long long> a(N), b(N), c(N), d(N);
    for (long long i = 0, _n = (N); (i) < (long long)_n; ++i)
      cin >> a[i] >> b[i];
    for (long long i = 0, _n = (M); (i) < (long long)_n; ++i)
      cin >> c[i] >> d[i];
    auto D = [&](long long i, long long j) {
      return abs(a[i] - c[j]) + abs(b[i] - d[j]);
    };
    for (long long i = 0, _n = (N); (i) < (long long)_n; ++i) {
      long long ans = 0;
      for (long long j = 0, _n = (M); (j) < (long long)_n; ++j)
        if (D(i, j) < D(i, ans)) ans = j;
      cout << ans + 1 << endl;
    }
  }
  return 0;
}
