#include <bits/stdc++.h>
using namespace std;
struct Event {
  long long time;
  long long type;
  long long index;
  Event(long long time, long long type, long long index) {
    this->time = time;
    this->type = type;
    this->index = index;
  }
};
template <class T>
struct Cmd {
  bool operator()(T f, T s) {
    if (f->time != s->time) {
      return f->time > s->time;
    } else {
      if (f->type != s->type) {
        return f->type < s->type;
      } else {
        return f->index > s->index;
      }
    }
  }
};
int main() {
  long long n, p;
  cin >> n >> p;
  priority_queue<Event*, vector<Event*>, Cmd<Event*>> events;
  long long temp;
  for (int i = 0; i < n; ++i) {
    cin >> temp;
    events.push(new Event(temp, 1, i + 1));
  }
  set<long long> want, inQueue;
  long long curTime, queueTime = 0;
  vector<long long> ans(n, 0);
  while (!events.empty()) {
    auto currEvent = events.top();
    events.pop();
    curTime = currEvent->time;
    if (currEvent->type == 1) {
      want.insert(currEvent->index);
    } else {
      inQueue.erase(currEvent->index);
      ans[currEvent->index - 1] = curTime;
    }
    if (!want.empty()) {
      auto x = want.begin();
      if (inQueue.empty() || *x < *inQueue.begin()) {
        inQueue.insert(*x);
        auto eve = new Event(max(curTime, queueTime) + p, 0, *x);
        queueTime = eve->time;
        events.push(eve);
        want.erase(*x);
      }
    }
  }
  for (size_t i = 0; i < ans.size(); ++i) {
    cout << ans[i] << ' ';
  }
  cout << endl;
  return 0;
}
