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