#include <bits/stdc++.h>
using namespace std;
class BinaryIndexedTree {
  int N;
  vector<int> tree;

 public:
  BinaryIndexedTree(int _N) : N(_N), tree(_N + 1) {}
  int query(int idx) {
    int res = 0;
    for (int i = idx; i > 0; i -= (i & -i)) res += tree[i];
    return res;
  }
  int query(int L, int R) { return L <= R ? query(R) - query(L - 1) : 0; }
  void update(int idx, int val = 1) {
    for (int i = idx; i <= N; i += (i & -i)) tree[i] += val;
  }
};
int N;
long long P;
int T[100004];
long long ans[100004];
struct Event {
  long long time;
  char type;
  int id;
  bool operator<(const Event& e) const {
    if (time != e.time) return time > e.time;
    if (type != e.type) return type < e.type;
    return id > e.id;
  }
};
int main(int argc, char* argv[]) {
  int N;
  long long P;
  scanf("%d %lld", &N, &P);
  for (int i = (1), _b = (N); i <= _b; ++i) scanf("%d", &T[i]);
  priority_queue<Event> eventQ;
  for (int i = (1), _b = (N); i <= _b; ++i) eventQ.push({T[i], 'W', i});
  int boiling = -1;
  queue<int> standing;
  priority_queue<int, vector<int>, greater<int> > sitting;
  BinaryIndexedTree empty_seats(N);
  for (int steps = 1; !eventQ.empty(); steps++) {
    Event e = eventQ.top();
    eventQ.pop();
    if (e.type == 'A') {
      if (boiling >= 0) {
        ans[boiling] = e.time;
        empty_seats.update(boiling, -1);
      } else {
      }
      if (!standing.empty()) {
        boiling = standing.front();
        standing.pop();
        eventQ.push({e.time + P, 'A', -1});
      } else
        boiling = -1;
    } else {
      sitting.push(e.id);
    }
    if (!sitting.empty()) {
      int id = sitting.top();
      if (empty_seats.query(id) == 0) {
        empty_seats.update(id, +1);
        sitting.pop();
        if (boiling < 0) {
          assert(standing.empty());
          boiling = id;
          eventQ.push({e.time + P, 'A', -1});
        } else {
          standing.push(e.id);
        }
      }
    }
  }
  for (int i = (1), _b = (N); i <= _b; ++i) printf("%lld ", ans[i]);
  putchar('\n');
  return 0;
}
