#include <bits/stdc++.h>
using namespace std;
const int maxn = 100 * 1000 + 10;
long long ans[maxn], qt, z, p;
set<pair<long long, pair<bool, int>>> e;
set<int> want, inq;
int n, t[maxn], ind, sw;
bool type;
int main() {
  cin >> n >> p;
  for (int i = 0; i < n; i++) {
    cin >> t[i];
    e.insert({t[i], {1, i}});
  }
  while (!e.empty()) {
    z = e.begin()->first;
    type = e.begin()->second.first;
    ind = e.begin()->second.second;
    e.erase(e.begin());
    if (!type)
      inq.erase(ind);
    else
      want.insert(ind);
    if ((e.empty() || z < e.begin()->first) && !want.empty()) {
      sw = *want.begin();
      if (inq.empty() || sw < *inq.begin()) {
        ans[sw] = max(z, qt) + p;
        qt = ans[sw];
        inq.insert(sw);
        want.erase(sw);
        e.insert({ans[sw], {0, sw}});
      }
    }
  }
  for (int i = 0; i < n; i++) cout << ans[i] << " ";
  return 0;
}
