#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m;
  cin >> n >> m;
  vector<long long> arr1(n), arr2(m);
  for (long long i = 0; i < n; i++) {
    cin >> arr1[i];
  }
  for (long long i = 0; i < m; i++) {
    cin >> arr2[i];
  }
  sort(arr1.begin(), arr1.end());
  for (long long i = 0; i < m; i++) {
    cout << upper_bound(arr1.begin(), arr1.end(), arr2[i]) - arr1.begin()
         << " ";
  }
}
