#!/usr/bin/ python3.8 import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines import numpy as np N, M = map(int, readline().split()) A = np.array(readline().split(), np.int64) B = np.array(readline().split(), np.int64) A.sort() C = np.searchsorted(A, B, side='right') - np.searchsorted(A, B, side='left') print(' '.join(C.astype(str)))