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