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