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