#include <bits/stdc++.h>
using namespace std;
long long max(long long a, long long b) {
  if (a > b) return a;
  return b;
}
int main() {
  long long int numa, numb;
  cin >> numa >> numb;
  vector<long long int> a;
  for (long long int i = 0; i < numa; i++) {
    long long int temp;
    cin >> temp;
    a.push_back(temp);
  }
  sort(a.begin(), a.end());
  for (long long int i = 0; i < numb; i++) {
    long long int temp;
    cin >> temp;
    cout << (upper_bound(a.begin(), a.end(), temp) - a.begin()) << " ";
  }
}
