#include <bits/stdc++.h>
using namespace std;
int n, m;
const int maksn = 200000;
vector<int> a;
int main() {
  a.resize(maksn + 1);
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  sort(a.begin(), a.begin() + n);
  for (int i = 0; i < m; i++) {
    int tmpb;
    scanf("%d", &tmpb);
    printf("%d%c", (upper_bound(a.begin(), a.begin() + n, tmpb) - a.begin()),
           ' ');
  }
  printf("\n");
}
