#include <bits/stdc++.h>
static int xd = 0;
using namespace std;
template <class num>
inline void rd(num &x) {
  char c;
  while (isspace(c = getchar()))
    ;
  bool neg = false;
  if (!isdigit(c))
    neg = (c == '-'), x = 0;
  else
    x = c - '0';
  while (isdigit(c = getchar())) x = (x << 3) + (x << 1) + c - '0';
  if (neg) x = -x;
}
long long ans[112345];
int v[112345];
int main(void) {
  int n, p;
  rd(n);
  rd(p);
  for (int i = 0; i < n; i++) rd(v[i]);
  priority_queue<tuple<long long, int, int>,
                 vector<tuple<long long, int, int> >,
                 greater<tuple<long long, int, int> > >
      pq;
  for (int i = 0; i < n; i++) {
    pq.push(make_tuple(v[i], 0, i));
  }
  set<int> active;
  queue<int> q;
  set<int> onqueue;
  while (!pq.empty()) {
    long long tempo;
    int type, id;
    tie(tempo, type, id) = pq.top();
    pq.pop();
    if (type == 0) {
      if (q.empty()) {
        q.push(id);
        onqueue.insert(id);
        pq.push(make_tuple(tempo + p, 1, id));
      } else if (*onqueue.begin() < id) {
        active.insert(id);
      } else {
        q.push(id);
        onqueue.insert(id);
      }
    } else {
      int f = q.front();
      ans[f] = tempo;
      q.pop();
      onqueue.erase(f);
      if (q.empty()) {
        if (!active.empty()) {
          int x = *(active.begin());
          q.push(x);
          onqueue.insert(x);
          pq.push(make_tuple(tempo + p, 1, id));
          active.erase(x);
        }
      } else {
        int mini = *onqueue.begin();
        while (!active.empty() and *(active.begin()) < mini) {
          int x = *(active.begin());
          q.push(x);
          onqueue.insert(x);
          active.erase(x);
        }
        pq.push(make_tuple(tempo + p, 1, id));
      }
    }
  }
  for (int i = 0; i < n; i++) cout << ans[i] << " \n"[i + 1 == n];
  return 0;
}
