#include <bits/stdc++.h>
int a[200000], b[200000];
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  for (int i = 0; i < n; ++i) {
    scanf("%d", a + i);
  }
  for (int i = 0; i < m; ++i) {
    scanf("%d", b + i);
  }
  std::sort(a, a + n);
  for (int i = 0; i < m; ++i) {
    printf("%ld ", (std::upper_bound(a, a + n, b[i]) - a));
  }
  return 0;
}
