#include <bits/stdc++.h>
using namespace std;
const int len = 1e5 + 10;
const int mod = 1e9 + 7;
long long a[len], ans[len];
long long sum[len * 4];
void pushup(int i) { sum[i] = min(sum[i * 2], sum[i * 2 + 1]); }
void built(int i, int l, int r) {
  if (l == r) {
    sum[i] = a[l];
    return;
  }
  int mid = (l + r) / 2;
  built(i * 2, l, mid);
  built(i * 2 + 1, mid + 1, r);
  pushup(i);
}
void update(int i, int l, int r, int x) {
  if (l == r) {
    sum[i] = 4e18;
    return;
  }
  int mid = (l + r) / 2;
  if (x <= mid)
    update(i * 2, l, mid, x);
  else
    update(i * 2 + 1, mid + 1, r, x);
  pushup(i);
}
long long query(int i, int l, int r, int ql, int qr) {
  if (ql <= l && r <= qr) return sum[i];
  int mid = (l + r) / 2;
  long long minx = 4e18;
  if (ql <= mid) minx = min(minx, query(i * 2, l, mid, ql, qr));
  if (qr > mid) minx = min(minx, query(i * 2 + 1, mid + 1, r, ql, qr));
  return minx;
}
int main() {
  long long p, n;
  cin >> n >> p;
  for (int i = 1; i <= n; ++i) scanf("%lld", &a[i]);
  long long all = 0;
  built(1, 1, n);
  while (sum[1] != 4e18) {
    if (sum[1] > all) all = sum[1];
    int l = 1, r = n, mid;
    while (l < r) {
      mid = (l + r) / 2;
      if (query(1, 1, n, 1, mid) <= all)
        r = mid;
      else
        l = mid + 1;
    }
    all += p;
    ans[r] = all;
    update(1, 1, n, r);
    while (1) {
      l = 1;
      long long minx = query(1, 1, n, l, r);
      if (minx > all) break;
      while (l < r) {
        mid = (l + r) / 2;
        if (query(1, 1, n, 1, mid) <= minx)
          r = mid;
        else
          l = mid + 1;
      }
      update(1, 1, n, r);
      ans[r] = all + p;
      all = ans[r];
    }
  }
  for (int i = 1; i <= n; ++i) printf("%lld ", ans[i]);
}
