N, D = map(int, input().split()) # 人数, 必要距離 a = list(map(int, input().split())) # デフォ位置 pre = 0 print(0, end = " ") for now in a: if (pre + D > now): now = pre + D print(now, end = " ") pre = now print() # 改行