#include <bits/stdc++.h>
using namespace std;
void fast() {
  std::ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
const long long MOD = 1e9 + 7;
int main() {
  long long n, m;
  cin >> n >> m;
  long long a[n], b[m];
  for (long long i = 0; i < n; ++i) cin >> a[i];
  for (long long i = 0; i < m; ++i) cin >> b[i];
  sort(a, a + n);
  long long kk;
  for (long long i = 0; i < m; ++i) {
    kk = upper_bound(a, a + n, b[i]) - a;
    cout << kk << " ";
  }
}
