#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n1, n2;
  cin >> n1 >> n2;
  long long int a[n1], b[n2];
  for (long long int i = 0; i < n1; i++) {
    cin >> a[i];
  }
  for (long long int i = 0; i < n2; i++) {
    cin >> b[i];
  }
  sort(a, a + n1);
  for (long long int i = 0; i < n2; i++) {
    cout << upper_bound(a, a + n1, b[i]) - a << " ";
  }
  return 0;
}
