#include <bits/stdc++.h>
using namespace std;
const int N = 2 * 1e5;
int a[N];
int b[N];
int main() {
  int n, m;
  cin >> n >> 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 << (int)(upper_bound(a, a + n, b[i]) - a) << ' ';
  return 0;
}
