#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 1;
struct node {
  int t, idx;
  bool operator<(const node& rhs) const {
    return t == rhs.t ? idx < rhs.idx : t < rhs.t;
  }
} dat[MAXN];
priority_queue<int, vector<int>, greater<int> > Q;
int n, min_idx, t[MAXN];
long long ans[MAXN], tmp, p;
int main(void) {
  cin >> n >> p;
  for (int i = 1; i <= n; ++i)
    scanf("%d", &dat[i].t), dat[i].idx = i, t[i] = dat[i].t;
  sort(dat + 1, dat + 1 + n);
  tmp = 0;
  int r = 0;
  while (!Q.empty() || r < n) {
    if (Q.empty()) Q.push(dat[++r].idx);
    min_idx = Q.top();
    ans[Q.top()] = tmp = max(t[min_idx] + p, (tmp + p));
    Q.pop();
    while (r < n && dat[r + 1].t <= tmp) {
      ++r;
      if (dat[r].idx > min_idx)
        Q.push(dat[r].idx);
      else
        ans[dat[r].idx] = (tmp += p), min_idx = dat[r].idx;
    }
  }
  for (int i = 1; i <= n; ++i) printf("%lld%c", ans[i], " \n"[i == n]);
  return 0;
}
