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