#include <bits/stdc++.h>
using namespace std;
const int ms = 200015;
int n, m;
int a[ms], b[ms];
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  for (int i = 0; i < m; i++) scanf("%d", &b[i]);
  sort(a, a + n);
  for (int i = 0; i < m; i++) {
    int pos = upper_bound(a, a + n, b[i]) - a;
    if (i) printf(" ");
    printf("%d", pos);
  }
  printf("\n");
  return 0;
}
