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