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