#include <bits/stdc++.h>
const double PI = acos(-1);
template <class A, class B>
std::ostream& operator<<(std::ostream& st, const std::pair<A, B> p) {
  st << "(" << p.first << ", " << p.second << ")";
  return st;
}
using namespace std;
const int MAX = 100 * 1000 + 10;
struct node {
  int watcherCount;
  int inSeatCount;
};
int n, P;
int T[MAX];
long long ans[MAX];
queue<int> q;
node ST[1 << 20];
void build(int cur, int s, int e) {
  ST[cur].watcherCount = 0;
  ST[cur].inSeatCount = e - s + 1;
  if (s == e) return;
  int m = (s + e) >> 1, left = 2 * cur + 1, right = left + 1;
  build(left, s, m);
  build(right, m + 1, e);
}
void seatUnseat(int cur, int s, int e, int p, int v) {
  ST[cur].inSeatCount += v;
  if (s == e) return;
  int m = (s + e) >> 1, left = 2 * cur + 1, right = left + 1;
  if (p <= m)
    seatUnseat(left, s, m, p, v);
  else
    seatUnseat(right, m + 1, e, p, v);
}
void makeUnMakeWatcher(int cur, int s, int e, int p, int v) {
  ST[cur].watcherCount += v;
  if (s == e) return;
  int m = (s + e) >> 1, left = 2 * cur + 1, right = left + 1;
  if (p <= m)
    makeUnMakeWatcher(left, s, m, p, v);
  else
    makeUnMakeWatcher(right, m + 1, e, p, v);
}
std::vector<int> moveToQueue;
bool getReady(int cur, int s, int e, int cnt) {
  if (cnt < s || ST[cur].watcherCount == 0) return 0;
  if (s == e) {
    moveToQueue.push_back(s);
    return 1;
  }
  int m = (s + e) >> 1, left = 2 * cur + 1, right = left + 1;
  if (getReady(left, s, m, cnt)) return 1;
  cnt += ST[left].inSeatCount;
  return getReady(right, m + 1, e, cnt);
}
long long QT = 0;
int main() {
  scanf("%d %d", &n, &P);
  for (int i = 0; i < (n); i++) scanf("%d", T + i);
  set<pair<long long, int>> events;
  for (int i = 0; i < (n); i++) events.emplace(T[i], i);
  build(0, 0, n - 1);
  std::vector<int> aux;
  while (!events.empty()) {
    auto cur = *events.begin();
    long long t = cur.first;
    aux.clear();
    bool f = 0;
    while (!events.empty() && events.begin()->first == t) {
      int p = events.begin()->second;
      events.erase(events.begin());
      aux.push_back(p);
    }
    while (!aux.empty() && aux.back() != -1) {
      int u = aux.back();
      aux.pop_back();
      makeUnMakeWatcher(0, 0, n - 1, u, 1);
    }
    moveToQueue.clear();
    while (!aux.empty()) {
      assert(aux.back() == -1);
      assert(!q.empty());
      aux.pop_back();
      int u = q.front();
      q.pop();
      ans[u] = t;
      seatUnseat(0, 0, n - 1, u, 1);
    }
    getReady(0, 0, n - 1, 0);
    for (int u : moveToQueue) {
      q.push(u);
      events.emplace(QT = max(QT, t) + P, -1);
      seatUnseat(0, 0, n - 1, u, -1);
      makeUnMakeWatcher(0, 0, n - 1, u, -1);
    }
  }
  for (int i = 0; i < (n); i++) printf("%lld%c", ans[i], " \n"[i == n - 1]);
  return 0;
}
