#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const long long INF = 1000000007;
const long long INF2 = 1000000007LL * 1000000007LL;
const long double EPS = 1e-9;
const int SIZE = 300100;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  vector<int> a(n), b(m);
  for (auto& i : a) cin >> i;
  for (auto& i : b) cin >> i;
  sort(begin(a), end(a));
  for (auto& i : b)
    cout << (upper_bound(begin(a), end(a), i) - begin(a)) << " ";
  return 0;
}
