n, m = map(int, input().split()) W = list(map(int, input().split())) tot = sum(W) if m >= tot: times = m // tot print(*(w * times for w in W)) else: div = tot // m print(*(w // div for w in W))