#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m;
  cin >> n >> m;
  long long a[n], ma;
  for (int i = 0; i < n; ++i) cin >> a[i];
  sort(a, a + n);
  for (int i = 0; i < m; ++i) {
    cin >> ma;
    cout << upper_bound(a, a + n, ma) - a << ' ';
  }
}
