#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int n, p;
  cin >> n >> p;
  vector<int> t(n);
  for (int i = 0; i < n; i++) {
    cin >> t[i];
  }
  vector<pair<int, int> > a;
  for (int i = 0; i < n; i++) {
    a.push_back({t[i], i});
  }
  sort(a.begin(), a.end());
  deque<int> q;
  set<int> pend, inq;
  int i = 0;
  ll time = 0;
  vector<ll> ans(n);
  while (!inq.empty() || !pend.empty() || i < n) {
    int cur;
    if (!inq.empty()) {
      cur = q.front();
      q.pop_front();
      inq.erase(cur);
    } else if (!pend.empty()) {
      cur = *pend.begin();
      pend.erase(pend.begin());
    } else {
      cur = a[i].second;
      time = a[i].first;
      i++;
    }
    time += p;
    ans[cur] = time;
    while (i < n && a[i].first <= time) {
      int head = inq.empty() ? cur : min(cur, *inq.begin());
      if (head > a[i].second) {
        q.push_back(a[i].second);
        inq.insert(a[i].second);
      } else {
        pend.insert(a[i].second);
      }
      i++;
    }
  }
  for (int i = 0; i < n; i++) {
    cout << ans[i] << ' ';
  }
  cout << endl;
  return 0;
}
