N,M = map(int,input().split()) lsW = list(map(int,input().split())) sumW = sum(lsW) ball = sumW/M print(*[int(lsW[i]/ball) for i in range(N)])