#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int lcm(int a, int b) { return (a * b) / gcd(a, b); }
long long MAXN = 10e9;
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> v(n), a(m);
  for (long long i = 0; i < n; i++) {
    cin >> v[i];
  }
  for (long long i = 0; i < m; i++) cin >> a[i];
  sort(v.begin(), v.end());
  for (long long i = 0; i < m; i++) {
    int ans = upper_bound(v.begin(), v.end(), a[i]) - v.begin();
    cout << ans << " ";
  }
}
