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