#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
struct event {
  ll time;
  ll type;
  ll id;
  bool operator<(const event& o) const {
    if (time != o.time) return time > o.time;
    if (type != o.type) return type < o.type;
    return id > o.id;
  }
};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  ll n, p;
  cin >> n >> p;
  priority_queue<event> pq;
  for (ll i = 0; i < n; i++) {
    ll t;
    cin >> t;
    pq.push({t, 0, i});
  }
  vector<ll> res(n);
  set<ll> inque, readytogo;
  queue<ll> q;
  while (!pq.empty()) {
    auto e = pq.top();
    pq.pop();
    if (e.type == 0) {
      readytogo.insert(e.id);
    } else {
      q.pop();
      inque.erase(e.id);
      res[e.id] = e.time;
      if (!q.empty()) {
        pq.push({e.time + p, -1, q.front()});
      }
    }
    if (!readytogo.empty()) {
      ll x = *readytogo.begin();
      if (inque.upper_bound(x) == inque.begin()) {
        readytogo.erase(x);
        inque.insert(x);
        if (q.empty()) {
          pq.push({e.time + p, -1, x});
        }
        q.push(x);
      }
    }
  }
  for (ll x : res) {
    cout << x << " ";
  }
  cout << endl;
}
