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