#include <bits/stdc++.h>
using namespace std;
const int N = 202002;
int ar[N], br[N], n, i, j, cnt;
int main() {
  int m;
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> ar[i];
  }
  sort(ar, ar + n);
  for (int i = 0; i < m; i++) {
    cin >> br[i];
    cnt = lower_bound(ar, ar + n, br[i] + 1) - ar;
    cout << cnt << " ";
  }
}
