#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using PII = pair<ll, ll>;
template <typename T>
void chmin(T &a, const T &b) {
  a = min(a, b);
}
template <typename T>
void chmax(T &a, const T &b) {
  a = max(a, b);
}
struct FastIO {
  FastIO() {
    cin.tie(0);
    ios::sync_with_stdio(0);
  }
} fastiofastio;
const ll INF = 1LL << 60;
int main(void) {
  ll n, p;
  cin >> n >> p;
  vector<ll> t(n);
  for (ll i = (ll)0; i < (ll)n; ++i) cin >> t[i];
  using V = vector<ll>;
  priority_queue<V, vector<V>, greater<V>> event;
  for (ll i = (ll)0; i < (ll)n; ++i) event.push({t[i], 0, i});
  queue<ll> que;
  set<ll> can, leave;
  vector<ll> ans(n);
  while (event.size()) {
    V v = event.top();
    event.pop();
    ll time = v[0], type = v[1], index = v[2];
    if (type == 1) {
      ans[index] = time;
      leave.erase(index);
      que.pop();
      if (que.size()) event.push({time + p, 1, que.front()});
    } else {
      can.insert(index);
    }
    if (can.size()) {
      ll first = *can.begin();
      if (leave.size() == 0 || *leave.begin() > first) {
        can.erase(first);
        leave.insert(first);
        que.push(first);
        if (que.size() == 1) event.push({time + p, 1, que.front()});
      }
    }
  }
  for (ll i = (ll)0; i < (ll)n; ++i)
    cout << ans[i] << (i == n - 1 ? '\n' : ' ');
  cout << flush;
  return 0;
}
