#include <bits/stdc++.h>
using namespace std;
priority_queue<pair<int, int>> events;
set<int> wait;
queue<int> inq;
long long h[1000005];
int main() {
  int n, p, x;
  long long now = 0;
  scanf("%d%d", &n, &p);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &x);
    events.push(make_pair(-x, -i));
  }
  for (int i = 1; i <= n; i++) {
    if (inq.empty() && wait.empty()) now = -events.top().first;
    now += p;
    while (!events.empty() && -events.top().first <= now) {
      if (inq.empty() || -events.top().second < inq.back())
        inq.push(-events.top().second);
      else
        wait.insert(-events.top().second);
      events.pop();
    }
    h[inq.front()] = now;
    inq.pop();
    if (inq.empty() && !wait.empty()) {
      inq.push(*wait.begin());
      wait.erase(wait.begin());
    }
  }
  for (int i = 1; i <= n; i++) printf("%lld ", h[i]);
  return 0;
}
