R=range J=lambda:list(map(int,input().split())) N,H,T=J() A=J() D=[0]*N C=D[:] S=[] import heapq as h for i in R(N):d=D[i]=(H+A[i]-1)//A[i];h.heappush(S,(d,-d*A[i],i)) for t in R(T):d,v,i=h.heappop(S);C[i]+=1;h.heappush(S,(d+D[i],v,i)) print(*C)