#include <bits/stdc++.h>
using namespace std;
const int N = 2e5;
int a[N], b[N];
int main() {
  std::ios::sync_with_stdio(false);
  int n, m, i, j, num;
  cin >> n >> m;
  for (i = 0; i < n; ++i) {
    cin >> a[i];
  }
  sort(a, a + n);
  for (i = 0; i < m; ++i) {
    cin >> b[i];
  }
  for (i = 0; i < m; i++) {
    num = upper_bound(a, a + n, b[i]) - a;
    cout << num << " ";
  }
  return 0;
}
