#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
long long ans[N];
struct no {
  int pos, t;
  bool operator<(const no &a) const { return pos > a.pos; }
} a[N];
bool cmp(no a, no b) {
  if (a.t == b.t) return a.pos < b.pos;
  return a.t < b.t;
}
priority_queue<no> que;
queue<no> tq;
set<int> s;
int main() {
  int n, P;
  scanf("%d%d", &n, &P);
  for (int i = 1; i <= n; i++) {
    a[i].pos = i;
    scanf("%d", &a[i].t);
  }
  sort(a + 1, a + 1 + n, cmp);
  int p = 1;
  long long now = a[1].t;
  s.insert(n + 1);
  while (p <= n || !tq.empty() || !que.empty()) {
    if (!tq.empty()) {
      no k = tq.front();
      tq.pop();
      now += P;
      ans[k.pos] = now;
      while (p <= n && a[p].t < now) {
        if (a[p].pos < *s.begin()) {
          s.insert(a[p].pos);
          tq.push(a[p++]);
        } else {
          que.push(a[p++]);
        }
      }
      s.erase(k.pos);
    }
    if (tq.empty() && que.empty()) now = max(now, 1ll * a[p].t);
    while (p <= n && a[p].t <= now) que.push(a[p++]);
    int POS = *s.begin();
    if (!que.empty() && que.top().pos <= POS) {
      tq.push(que.top());
      s.insert(que.top().pos);
      que.pop();
    }
  }
  for (int i = 1; i <= n; i++) printf("%lld ", ans[i]);
}
