#include <bits/stdc++.h>
using namespace std;
const long long inf = (1e16);
const int MAX = (1e5) + 5;
long long prin[MAX], ara[MAX], tree[MAX * 4];
long long miin(long long a, long long b) {
  return (min(a, b) == -1) ? max(a, b) : min(a, b);
}
void update(long long idx, long long b, long long e, long long p, long long v) {
  if (b > p || e < p) return;
  if (b == e) {
    tree[idx] = ara[p] = v;
    return;
  }
  long long mid = (b + e) >> 1;
  update((idx << 1), b, mid, p, v);
  update(((idx << 1) | 1), mid + 1, e, p, v);
  tree[idx] = miin(tree[(idx << 1)], tree[((idx << 1) | 1)]);
}
long long query(long long idx, long long b, long long e, long long v) {
  if (tree[idx] > v) return -1;
  if (b == e) return b;
  long long m = (b + e) >> 1;
  long long lft = query((idx << 1), b, m, v);
  if (lft == -1)
    return query(((idx << 1) | 1), m + 1, e, v);
  else
    return lft;
}
long long queryRan(long long idx, long long b, long long e, long long r) {
  if (b > r) return -1;
  if (b == e) return b;
  long long m = (b + e) >> 1;
  if (tree[(idx << 1)] <= tree[((idx << 1) | 1)])
    return queryRan((idx << 1), b, m, r);
  long long rgt = queryRan(((idx << 1) | 1), m + 1, e, r);
  if (rgt == -1 || ara[rgt] >= tree[(idx << 1)])
    return queryRan((idx << 1), b, m, r);
  return rgt;
}
void solve() {
  memset(tree, -1, sizeof(tree));
  long long n, p;
  cin >> n >> p;
  for (long long i = 0; i <= n - 1; i++) {
    cin >> ara[i];
    update(1, 0, n - 1, i, ara[i]);
  }
  long long timeNow = 0, c = 0;
  while (c < n) {
    timeNow = max(timeNow, tree[1]);
    long long x = query(1, 0, n - 1, timeNow);
    timeNow += p;
    prin[x] = timeNow;
    update(1, 0, n - 1, x, inf);
    c++;
    while (x > 0) {
      x = queryRan(1, 0, n - 1, x);
      if (ara[x] <= timeNow) {
        timeNow += p;
        prin[x] = timeNow;
        update(1, 0, n - 1, x, inf);
        c++;
      } else
        break;
    }
  }
  for (long long i = 0; i <= n - 1; i++) cout << prin[i] << " ";
}
int main() {
  ios::sync_with_stdio(false);
  solve();
  return 0;
}
