#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, x;
  scanf("%d%d", &n, &m);
  int a[n];
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  sort(a, a + n);
  while (m--) {
    scanf("%d", &x);
    cout << upper_bound(a, a + n, x) - a << " ";
  }
}
