n,m = map(int,input().split()) w = list(map(int,input().split())) b = sum(w)/m a = [] for wi in w: a.append(round(wi/b)) print(*a)