N, D = map(int, input().split()) a = list(map(int, input().split())) ans = [0] a = [0] + a # print("a =", a) for i in range(1, N): gap = a[i] - a[i - 1] if gap < D: # ans += D a[i] = a[i - 1] + D else: a[i] = ans[-1] + a[i] ans.append(a[i]) print(*ans)