#include <bits/stdc++.h>
using namespace std;
const int MX = 300000 + 5;
const long long inf = 1e18;
const long long mod = 1e9 + 7;
long long T[4 * MX], a[MX], t[MX];
void up(int p, int l, int h, int x, long long vl) {
  if (l == h) {
    T[p] = vl;
    return;
  }
  int m = (l + h) / 2;
  if (x <= m)
    up(2 * p, l, m, x, vl);
  else
    up(2 * p + 1, m + 1, h, x, vl);
  T[p] = min(T[2 * p], T[2 * p + 1]);
}
int Q(int p, int l, int h, long long x) {
  if (l == h) return l;
  int m = (l + h) / 2;
  if (T[2 * p] <= x)
    return Q(2 * p, l, m, x);
  else
    return Q(2 * p + 1, m + 1, h, x);
}
long long Q1(int p, int l, int h, int x, int y) {
  if (l > y || h < x) return inf;
  if (l >= x && h <= y) return T[p];
  int m = (l + h) / 2;
  return min(Q1(2 * p, l, m, x, y), Q1(2 * p + 1, m + 1, h, x, y));
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, p;
  cin >> n >> p;
  n++;
  for (int i = 1; i < n; i++) {
    long long x;
    cin >> x;
    t[i] = x;
    up(1, 1, n, i, x);
  }
  long long xx = 0, cnt = 0;
  while (cnt + 1 < n) {
    int rs = Q(1, 1, n, xx);
    if (rs == n) {
      xx = Q1(1, 1, n, 1, n - 1);
      rs = Q(1, 1, n, xx);
    }
    int R = rs;
    xx += p;
    a[R] = xx;
    up(1, 1, n, R, inf);
    cnt++;
    while (true) {
      long long yy = Q1(1, 1, n, 1, R);
      if (yy == inf || yy > xx) break;
      rs = Q(1, 1, n, yy);
      R = rs;
      xx += p;
      a[R] = xx;
      up(1, 1, n, R, inf);
      cnt++;
    }
  }
  for (int i = 1; i < n; i++) {
    cout << a[i];
    if (i + 1 < n) cout << ' ';
  }
  cout << endl;
  return 0;
}
