#include <bits/stdc++.h>
using namespace std;
struct passenger {
  int pos, startime;
} psger[100005];
struct cmp_waiting {
  bool operator()(const passenger &x, const passenger &y) {
    return x.pos > y.pos;
  }
};
struct cmp_sitting {
  bool operator()(const passenger &x, const passenger &y) {
    if (x.startime == y.startime)
      return x.pos > y.pos;
    else
      return x.startime > y.startime;
  }
};
priority_queue<passenger, vector<passenger>, cmp_sitting> sitting;
priority_queue<passenger, vector<passenger>, cmp_waiting> waiting;
queue<passenger> queuing;
set<int> emptyseat;
long long ret[100005];
int main() {
  int n;
  long long p, now;
  cin >> n >> p;
  for (int i = 1; i <= n; ++i) {
    cin >> psger[i].startime;
    psger[i].pos = i;
    sitting.push(psger[i]);
  }
  now = sitting.top().startime;
  emptyseat.insert(n + 1);
  while (!sitting.empty() || !queuing.empty() || !waiting.empty()) {
    if (!queuing.empty()) {
      passenger fir = queuing.front();
      queuing.pop();
      now += p;
      ret[fir.pos] = now;
      while (!sitting.empty() && sitting.top().startime <= now) {
        passenger sec = sitting.top();
        if (sec.pos < *emptyseat.begin()) {
          emptyseat.insert(sec.pos);
          queuing.push(sec);
        } else
          waiting.push(sec);
        sitting.pop();
      }
      emptyseat.erase(fir.pos);
    }
    if (queuing.empty() && waiting.empty())
      now = max(now, (long long)sitting.top().startime);
    while (!sitting.empty() && sitting.top().startime <= now) {
      waiting.push(sitting.top());
      sitting.pop();
    }
    int id = *emptyseat.begin();
    if (!waiting.empty() && waiting.top().pos < id) {
      queuing.push(waiting.top());
      emptyseat.insert(waiting.top().pos);
      waiting.pop();
    }
  }
  for (int i = 1; i <= n; ++i) cout << ret[i] << " ";
  return 0;
}
