#include <bits/stdc++.h>
using namespace std;
struct event {
  long long int time;
  int type;
  int index;
};
struct cmp {
  bool operator()(event a, event b) {
    if (a.time < b.time) return true;
    if (a.time > b.time) return false;
    if (a.type < b.type) return true;
    if (a.type > b.type) return false;
    if (a.index < b.index) return true;
    return false;
  }
};
set<event, cmp> events;
event cur_event;
set<int> wanted;
queue<int> in_queue;
int n;
long long p, t, cur_time = 0, time_in_queue = 0;
long long answer[100010];
void add_event(long long time, int type, int index) {
  event tmp;
  tmp.time = time;
  tmp.type = type;
  tmp.index = index;
  events.insert(tmp);
}
void add_in_queue(int index) {
  in_queue.push(index);
  time_in_queue = max(time_in_queue, cur_time) + p;
  answer[index] = time_in_queue;
  add_event(time_in_queue, 0, index);
}
int main() {
  cin >> n >> p;
  for (int i = 0; i < n; ++i) {
    cin >> t;
    add_event(t, 1, i);
  }
  int i = 0;
  while (events.size()) {
    cur_event = *events.begin();
    events.erase(cur_event);
    cur_time = cur_event.time;
    if (cur_event.type == 1) {
      wanted.insert(cur_event.index);
    } else {
      in_queue.pop();
    }
    if (cur_event.type == 0 && events.begin()->time == cur_time) {
      continue;
    }
    if (wanted.size()) {
      if (!in_queue.size() || *wanted.begin() < in_queue.back()) {
        add_in_queue(*wanted.begin());
        wanted.erase(*wanted.begin());
      }
    }
  }
  for (int i = 0; i < n; ++i) {
    cout << answer[i] << ' ';
  }
  cout << endl;
  return 0;
}
