#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
int n, head, tail, sta[maxn], tq;
long long q, nowtime, tot, ans[maxn];
struct lll {
  int qq;
  long long t;
} node[maxn];
int cmp(lll x, lll y) { return (x.t == y.t) ? (x.qq < y.qq) : (x.t < y.t); }
priority_queue<int, vector<int>, greater<int> > Q;
int main() {
  scanf("%d%lld", &n, &q);
  for (int i = 1; i <= n; i++) scanf("%lld", &node[i].t), node[i].qq = i;
  sort(node + 1, node + n + 1, cmp);
  head = 1;
  tail = 0;
  tq = 1;
  while (tot < n) {
    if (tq <= n && Q.empty() && head > tail) {
      sta[++tail] = node[tq].qq;
      nowtime = node[tq].t;
      tq++;
    }
    if (head <= tail) {
      ans[sta[head]] = nowtime + q;
      head++;
    } else {
      ans[Q.top()] = nowtime + q;
      sta[++tail] = Q.top();
      ++head;
      Q.pop();
    }
    while (tq <= n && node[tq].t <= nowtime + q) {
      if (node[tq].qq < sta[tail]) {
        sta[++tail] = node[tq].qq;
      } else {
        Q.push(node[tq].qq);
      }
      tq++;
    }
    nowtime = nowtime + q;
    tot++;
  }
  for (int i = 1; i <= n; i++) printf("%lld ", ans[i]);
  printf("\n");
  return 0;
}
