#include <bits/stdc++.h>
#pragma GCC optimize("-ffloat-store")
using namespace std;
const long long int INF = 0xFFFFFFFFFFFFFFFL;
const long long int MOD = 1000000007L;
long long int T, n, in, i, m, j, k;
vector<long long int> a, b;
vector<long long int>::iterator it;
int main(void) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  scanf(" %lld", &n);
  scanf(" %lld", &m);
  a.clear();
  a.reserve(n);
  b.clear();
  b.reserve(m);
  for (i = 0; i < (n); ++i) {
    scanf(" %lld", &in);
    a.push_back(in);
  }
  for (i = 0; i < (m); ++i) {
    scanf(" %lld", &in);
    b.push_back(in);
  }
  sort(a.begin(), a.end());
  long long int ans;
  for (i = 0; i < (m); ++i) {
    ans = upper_bound(a.begin(), a.end(), b[i]) - a.begin();
    cout << ans << " ";
  }
  return 0;
}
