#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("O3")
const int mods[10] = {1000000007, 999999937, 999999929, 999999893, 999999883,
                      999999797,  999999761, 999999757, 999999751, 999999739};
const int mod = 1000000007;
int rand_mods[2];
const long double eps = 1e-10;
const int siz = 1e5 + 5, siz2 = (1 << 20) + 5, lg = 21, block = 448,
          block2 = 1000, mxv = 5e5, sqrt_mod = 31630;
const int alpha_sz = 26;
int n, p;
long long ans[siz];
struct evnt {
  long long time;
  int type, i;
};
struct cmp {
  bool operator()(const evnt &a, const evnt &b) {
    if (a.time != b.time) {
      return a.time > b.time;
    }
    if (a.type != b.type) {
      return a.type > b.type;
    }
    return a.i > b.i;
  }
};
priority_queue<evnt, vector<evnt>, cmp> pq;
priority_queue<int, vector<int>, greater<int>> wait;
queue<int> q;
int main() {
  scanf("%d%d", &n, &p);
  for (int i = 1; i <= n; i++) {
    int t;
    scanf("%d", &t);
    pq.push({t, 1, i});
  }
  long long last_exit = 0;
  while (!pq.empty()) {
    evnt e = pq.top();
    pq.pop();
    if (e.type) {
      if (q.empty() || q.back() > e.i) {
        last_exit = q.empty() ? e.time + p : last_exit + p;
        pq.push({last_exit, 0, e.i});
        q.push(e.i);
      } else {
        wait.push(e.i);
      }
    } else {
      ans[e.i] = e.time;
      q.pop();
      if (!wait.empty() && (q.empty() || q.back() > wait.top())) {
        pq.push({e.time, 1, wait.top()});
        wait.pop();
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    printf("%I64d ", ans[i]);
  }
  printf("\n");
  return 0;
}
