#include <bits/stdc++.h>
using namespace std;
namespace SGT {
int sumv[400000];
void build(int l, int r, int o) {
  sumv[o] = r - l + 1;
  if (l == r)
    return;
  else {
    int m = ((l + r) >> 1);
    build(l, m, o * 2);
    build(m + 1, r, o * 2 + 1);
  }
}
void update(int l, int r, int o, int p, int q) {
  if (l == r)
    sumv[o] = q;
  else {
    int m = ((l + r) >> 1);
    if (m >= p)
      update(l, m, o * 2, p, q);
    else
      update(m + 1, r, o * 2 + 1, p, q);
    sumv[o] = sumv[o * 2] + sumv[o * 2 + 1];
  }
}
bool query(int l, int r, int o, int p) {
  if (l == r)
    return 1;
  else {
    int m = ((l + r) >> 1);
    if (m >= p)
      return query(l, m, o * 2, p);
    else {
      if (!query(m + 1, r, o * 2 + 1, p)) return 0;
      return sumv[o * 2] == m - l + 1;
    }
  }
}
}  // namespace SGT
long long ans[100005];
priority_queue<pair<long long, int>, vector<pair<long long, int> >,
               greater<pair<long long, int> > >
    q1, q2;
priority_queue<int, vector<int>, greater<int> > q3;
int main() {
  int n, D;
  scanf("%d%d", &n, &D);
  for (int i = 1; i <= n; i++) {
    int x;
    scanf("%d", &x);
    q1.push(pair<long long, int>(x, i));
  }
  SGT::build(1, n, 1);
  int s = 0;
  long long maxn = 0;
  while (s < n)
    if (!q2.empty() && (q1.empty() || q2.top().first < q1.top().first)) {
      pair<long long, int> t = q2.top();
      q2.pop();
      int x = t.second;
      SGT::update(1, n, 1, x, 1);
      if (!q3.empty()) {
        int u = q3.top();
        if (SGT::query(1, n, 1, u)) {
          q3.pop();
          ans[u] = max(t.first, maxn) + D;
          maxn = max(maxn, ans[u]);
          q2.push(pair<long long, int>(ans[u], u));
          SGT::update(1, n, 1, u, 0);
          s++;
        }
      }
    } else {
      while (!q2.empty() && q2.top().first <= q1.top().first) {
        pair<long long, int> t = q2.top();
        q2.pop();
        int x = t.second;
        SGT::update(1, n, 1, x, 1);
      }
      pair<long long, int> t = q1.top();
      q1.pop();
      q3.push(t.second);
      int x = q3.top();
      if (SGT::query(1, n, 1, x)) {
        q3.pop();
        ans[x] = max(t.first, maxn) + D;
        maxn = max(maxn, ans[x]);
        q2.push(pair<long long, int>(ans[x], x));
        SGT::update(1, n, 1, x, 0);
        s++;
      }
    }
  for (int i = 1; i <= n; i++) printf("%lld ", ans[i]);
  printf("\n");
  return 0;
}
