N,D = map(int,input().split()) a = list(map(int,input().split())) a.insert(0,0) print(0,end = " ") for i in range(1,N): e = " " if a[i] - a[i-1] < D: a[i] = a[i-1] + D if i == N-1:e = "" print(a[i],end = e) print()