#!/usr/bin/env python3 N, D = map(int, input().split()) A = [0] + list(map(int, input().split())) Move = [0 for i in range(N)] M = 0 for i in range(1, N): d = A[i] - A[i-1] if d < D: M += D-d Move[i] = M Ret = [] for i in range(N): Ret.append(A[i]+Move[i]) print(*Ret)