from numpy.fft import* I=input I() b=[0]*len(a:=I().split()) for i in I().split():b[-int(i)]+=1 print(*map(int,ifft(fft(a)*fft(b))+.5))