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