from numpy import diff def main(): N, D = map(int, input().split()) others = list(map(int, input().split())) moved = [0] for person in others: if person - moved[-1] < D: moved.append(moved[-1] + D) else: moved.append(person) print(*moved) if __name__ == "__main__": main()