#include <bits/stdc++.h>
using namespace std;
int n, m;
int binarysearch(long long a[], long long value) {
  int low = 0, high = n;
  while (low < high) {
    int mid = (low + high) / 2;
    if (a[mid] <= value)
      low = mid + 1;
    else
      high = mid;
  }
  return low;
}
int main() {
  cin >> n >> m;
  long long a[n];
  long long b[m];
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < m; i++) cin >> b[i];
  sort(a, a + n);
  for (int i = 0; i < m; i++) cout << binarysearch(a, b[i]) << " ";
  return 0;
}
