from numpy import* (n,q),a,r=eval('int_(input().split()),'*3) b=zeros(n) for i in r: b[-i]+=1 print(*map(int,fft.ifft(fft.fft(a)*fft.fft(b))+.5))