#include <bits/stdc++.h>
using namespace std;
struct que {
  long long tim;
  bool type;
  long long id;
};
bool operator<(que a, que b) {
  return a.tim == b.tim ? (a.type == b.type ? a.id < b.id : a.type < b.type)
                        : a.tim > b.tim;
}
priority_queue<que> q;
priority_queue<long long, vector<long long>, greater<long long> > waiting;
set<long long> pouring;
long long n, p;
long long t[200010];
long long ans[200010];
signed main() {
  scanf("%lld%lld", &n, &p);
  for (long long i = 1; i <= n; ++i) {
    scanf("%lld", &t[i]);
    q.push({t[i], 1, i});
  }
  long long lstend = 0;
  while (!q.empty()) {
    long long nt = q.top().tim;
    do {
      que now = q.top();
      q.pop();
      if (now.type == 0) {
        ans[now.id] = now.tim;
        pouring.erase(now.id);
      } else {
        waiting.push(now.id);
      }
    } while (q.top().tim == nt && !q.empty());
    if (!waiting.empty() &&
        (pouring.empty() || waiting.top() < (*pouring.begin()))) {
      long long tmp = waiting.top();
      waiting.pop();
      pouring.insert(tmp);
      lstend = max(lstend, nt) + p;
      q.push({lstend, 0, tmp});
    }
  }
  for (long long i = 1; i <= n; ++i) {
    printf("%lld ", ans[i]);
  }
  puts("");
}
