#include <bits/stdc++.h>
using namespace std;
const long long MAX_N = 200 * 1000 + 10;
long long a[MAX_N];
int ans[MAX_N];
pair<long long, int> b[MAX_N];
int main() {
  int n, m;
  cin >> n >> m;
  for (int x = 0; x < n; x++) cin >> a[x];
  for (int x = 0; x < m; x++) {
    cin >> b[x].first;
    b[x].second = x;
  }
  sort(a, a + n);
  sort(b, b + m);
  int i = 0, j = 0;
  while (i < n && j < m) {
    while (j < m - 1 && a[i] > b[j].first) {
      j++;
      ans[b[j].second] += ans[b[j - 1].second];
    }
    if (a[i] <= b[j].first) ans[b[j].second]++;
    i++;
  }
  while (j < m - 1) {
    j++;
    ans[b[j].second] += ans[b[j - 1].second];
  }
  for (int x = 0; x < m; x++) cout << ans[x] << " ";
  cout << "\n";
  return 0;
}
