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