#include <bits/stdc++.h>
#pragma warning(disable : 4996)
const int maxn(200005);
using namespace std;
long long n, p;
long long Time;
struct people {
  long long t, pos, end;
} P[maxn];
bool cmp(const people& a, const people& b) {
  return a.t == b.t ? a.pos < b.pos : a.t < b.t;
}
long long ans[maxn];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> p;
  for (int i = 0; i <= n - 1; ++i) {
    cin >> P[i].t;
    P[i].pos = i;
  }
  sort(P, P + n, cmp);
  int last = n;
  priority_queue<long long, vector<long long>, greater<long long> > qpos;
  int q = -1;
  Time = 0;
  int l = 0;
  while (l < n) {
    if (q != -1) {
      ans[q] = Time + p;
      Time += p;
      last = q;
      q = -1;
    } else if (P[l].t <= Time) {
      if (P[l].pos < last)
        q = P[l].pos;
      else
        qpos.push(P[l].pos);
      l++;
    } else {
      if (!qpos.empty()) {
        int pos = qpos.top();
        qpos.pop();
        ans[pos] = Time + p;
        Time += p;
        last = pos;
      } else {
        Time = P[l].t;
        last = n;
      }
    }
  }
  if (q != -1) Time += p, ans[q] = Time;
  while (!qpos.empty()) {
    int pos = qpos.top();
    qpos.pop();
    Time += p;
    ans[pos] = Time;
  }
  for (int i = 0; i <= n - 1; ++i) cout << ans[i] << " \n"[i == n - 1];
}
