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