#include <bits/stdc++.h>
using namespace std;
int N, T;
long long Free;
struct Node {
  int PerSon, Type;
  bool operator<(const Node& b) const {
    return ((Type < b.Type) || ((Type == b.Type) && PerSon < b.PerSon));
  }
};
int main() {
  scanf("%d%d", &N, &T);
  set<pair<long long, Node> > Event;
  for (int i = 1; i <= N; i++) {
    int Tim;
    scanf("%d", &Tim);
    Node New;
    New.PerSon = i;
    New.Type = 1;
    Event.insert(make_pair(Tim, New));
  }
  set<int> que;
  set<int> Wait;
  vector<long long> ans(N + 1, 0);
  while (!Event.empty()) {
    pair<long long, Node> qwq;
    qwq = *Event.begin();
    Node Now = qwq.second;
    Event.erase(qwq);
    if (Now.Type == 1) {
      if (que.empty() || (*que.begin()) > Now.PerSon) {
        que.insert(Now.PerSon);
        long long Stime = max(qwq.first, Free);
        long long Etime = Stime + T;
        Free = Etime;
        Node New;
        New.PerSon = Now.PerSon;
        New.Type = 2;
        Event.insert(make_pair(Etime, New));
      } else
        Wait.insert(Now.PerSon);
    } else {
      ans[Now.PerSon] = qwq.first;
      que.erase(Now.PerSon);
      if (Wait.empty()) continue;
      if (que.empty() || (*Wait.begin()) < (*que.begin())) {
        int Person = *Wait.begin();
        Wait.erase(Person);
        que.insert(Person);
        long long Stime = max(qwq.first, Free);
        long long Etime = Stime + T;
        Free = Etime;
        Node New;
        New.PerSon = Person;
        New.Type = 2;
        Event.insert(make_pair(Etime, New));
      }
    }
  }
  for (int i = 1; i <= N; i++) printf("%lld ", ans[i]);
  return 0;
}
