#include <bits/stdc++.h>
using namespace std;
set<long long> wt, inq;
priority_queue<pair<long long, pair<int, int> >,
               vector<pair<long long, pair<int, int> > >,
               greater<pair<long long, pair<int, int> > > >
    event;
int n;
long long p, ans[100005];
void Read() {
  scanf("%d%I64d", &n, &p);
  for (int i = 1; i <= n; i++) {
    long long t;
    scanf("%I64d", &t);
    event.push(make_pair(t, make_pair(1, i)));
  }
}
void Solve() {
  long long qtime = 0, ctime = 0;
  while (!event.empty()) {
    pair<long long, pair<int, int> > cur = event.top();
    ctime = cur.first;
    while (!event.empty() && event.top().first == ctime) {
      if (cur.second.first == 0) {
        inq.erase(cur.second.second);
        ans[cur.second.second] = ctime;
      } else {
        wt.insert(cur.second.second);
        event.pop();
        break;
      }
      event.pop();
      if (!event.empty()) cur = event.top();
    }
    if (!event.empty() && cur.second.first == 0) event.push(cur);
    if (!wt.empty()) {
      int x = *(wt.begin());
      if (inq.empty() || x < *(inq.begin())) {
        wt.erase(x);
        inq.insert(x);
        event.push(make_pair(max(qtime, ctime) + p, make_pair(0, x)));
        qtime = max(qtime, ctime) + p;
      }
    }
  }
  for (int i = 1; i <= n; i++) printf("%I64d ", ans[i]);
}
int main() {
  Read();
  Solve();
  return 0;
}
