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