#include <bits/stdc++.h>
using namespace std;
int n, p;
struct Event {
  long long t, op, id;
  Event(long long _t, int _op, int _id) { t = _t, op = _op, id = _id; }
  bool operator<(const Event &e) const {
    return t != e.t ? t > e.t : (op != e.op ? op > e.op : id > e.id);
  }
};
priority_queue<Event> _time;
set<int> inq, wnt;
long long ans[100005];
int main() {
  scanf("%d%d", &n, &p);
  for (int i = 1, ti; i <= n; ++i) {
    scanf("%d", &ti);
    _time.push(Event(ti, 1, i));
  }
  long long curtime = 0;
  while (!_time.empty()) {
    Event e = _time.top();
    _time.pop();
    if (e.op == 1) {
      if (inq.empty() || *inq.begin() > e.id) {
        curtime = max(curtime, (long long)e.t);
        curtime += p;
        _time.push(Event(curtime, 3, e.id));
        inq.insert(e.id);
      } else
        wnt.insert(e.id);
    } else {
      ans[e.id] = e.t;
      inq.erase(e.id);
      if (!wnt.empty() && (inq.empty() || *inq.begin() > *wnt.begin())) {
        auto tmp = wnt.begin();
        curtime += p;
        _time.push(Event(curtime, 3, *tmp));
        inq.insert(*tmp);
        wnt.erase(tmp);
      }
    }
  }
  for (int i = 1; i <= n; ++i) printf("%lld%c", ans[i], " \n"[i == n]);
  return 0;
}
