#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T sqr(T x) {
  return x * x;
}
const double EPS = 1e-6;
const int INF = 0x3fffffff;
const long long LINF = INF * 1ll * INF;
const double PI = acos(-1.0);
struct Passenger {
  int pos, t;
  Passenger() {}
  Passenger(int pos, int t) : pos(pos), t(t) {}
  bool operator<(const Passenger &p) const {
    if (t == p.t) return pos > p.pos;
    return t > p.t;
  }
};
queue<int> q;
priority_queue<int, vector<int>, greater<int> > w;
priority_queue<Passenger> h;
set<int> s;
long long ans[100005];
int main() {
  int n, p;
  scanf("%d%d", &n, &p);
  for (int i = 1; i <= n; i++) {
    int x;
    scanf("%d", &x);
    h.push(Passenger(i, x));
  }
  long long curtime = 0;
  while (!h.empty()) {
    Passenger pa = h.top();
    h.pop();
    q.push(pa.pos);
    s.insert(pa.pos);
    curtime = pa.t;
    while (!q.empty()) {
      int id = q.front();
      q.pop();
      curtime += p;
      ans[id] = curtime;
      while (!h.empty() && h.top().t <= curtime) {
        pa = h.top();
        h.pop();
        if (*s.begin() > pa.pos) {
          q.push(pa.pos);
          s.insert(pa.pos);
        } else
          w.push(pa.pos);
      }
      s.erase(id);
      if (!w.empty()) {
        id = w.top();
        if (s.empty() || *s.begin() > id) {
          w.pop();
          s.insert(id);
          q.push(id);
        }
      }
    }
  }
  for (int i = 1; i <= n; i++) printf("%lld%c", ans[i], (i == n ? '\n' : ' '));
  return 0;
}
