#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
long long qpow(long long a, long long b, long long modd) {
  long long ans = 1, base = a;
  while (b) {
    if (b & 1) {
      ans = (ans * base) % modd;
    }
    base = (base * base) % modd;
    b >>= 1;
  }
  return ans;
}
const int N = 1e5 + 5;
const long long inf = 0x3f3f3f3f3f;
long long minn[N << 2];
long long ans[N];
long long t[N];
int fincnt;
long long n, p;
long long need;
void pushup(int i) { minn[i] = min(minn[(i << 1)], minn[(i << 1 | 1)]); }
void build(long long i, long long l, long long r) {
  if (l == r) {
    minn[i] = t[l];
    return;
  }
  long long mid = (l + r) >> 1;
  build((i << 1), l, mid);
  build((i << 1 | 1), mid + 1, r);
  pushup(i);
}
void update(long long i, long long l, long long r, long long pos,
            long long val) {
  if (l == r) {
    minn[i] = t[l] = val;
    return;
  }
  long long mid = (l + r) >> 1;
  if (pos <= mid)
    update((i << 1), l, mid, pos, val);
  else
    update((i << 1 | 1), mid + 1, r, pos, val);
  pushup(i);
}
int query(int i, int l, int r, long long val) {
  if (l == r) {
    return l;
  }
  long long mid = (l + r) >> 1;
  if (minn[(i << 1)] <= val)
    query((i << 1), l, mid, val);
  else
    query((i << 1 | 1), mid + 1, r, val);
}
long long query2(long long i, long long tl, long long tr, long long l,
                 long long r) {
  if (l > tr) {
    return -1;
  }
  if (l == r) return l;
  long long mid = (l + r) >> 1;
  if (minn[(i << 1)] <= minn[(i << 1 | 1)])
    return query2((i << 1), tl, tr, l, mid);
  long long rt = query2((i << 1 | 1), tl, tr, mid + 1, r);
  if (rt == -1 || t[rt] >= minn[(i << 1)])
    return query2((i << 1), tl, tr, l, mid);
  return rt;
}
signed main() {
  ios::sync_with_stdio(0);
  cin >> n >> p;
  memset(minn, 0x3f, sizeof(minn));
  for (int i = 1; i <= n; ++i) cin >> t[i];
  build(1, 1, n);
  need = 0;
  while (1) {
    need = max(need, minn[1]);
    int res;
    res = query(1, 1, n, need);
    ans[res] = need + p;
    fincnt++;
    need += p;
    update(1, 1, n, res, 1e18);
    while (res > 0) {
      res = query2(1, 1, res, 1, n);
      if (t[res] > need) {
        break;
      }
      ans[res] = need + p;
      need += p;
      fincnt++;
      update(1, 1, n, res, 1e18);
    }
    if (fincnt == n) break;
  }
  for (int i = 1; i <= n; ++i) {
    cout << ans[i] << ' ';
  }
}
