n, d = [int(v) for v in input().split()] a = [0] + [int(v) for v in input().split()] for i in range(n - 1): k = a[i + 1] - a[i] if k < d: a[i + 1] = a[i] + d print(*a)