#include <bits/stdc++.h>
using namespace std;
using LL = long long;
using LD = long double;
void err() { cerr << "\033[39;0m" << endl; }
template <typename T, typename... A>
void err(T a, A... x) {
  cerr << a << ' ';
  err(x...);
}
const int N = 1e5 + 10;
LL ans[N];
set<pair<LL, LL> > A;
bool iq[N];
set<int> Q;
set<int> W;
int q[N], head, tail;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, p;
  cin >> n >> p;
  for (decay<decltype(n + 1)>::type i = (1), _i = (n + 1); i < _i; ++i) {
    int t;
    cin >> t;
    A.emplace(t, i);
  }
  LL now = 0;
  auto pr = A.begin();
  for (decay<decltype(n)>::type i = (0), _i = (n); i < _i; ++i) {
    for (; pr != A.end(); ++pr) {
      int u = pr->second;
      if (Q.empty()) {
        if (now < pr->first) now = pr->first;
        Q.insert(u);
        q[tail] = u;
        ans[u] = now;
        ++tail;
      } else if (pr->first <= now + p) {
        if (pr->second < *Q.begin()) {
          Q.insert(u);
          q[tail] = u;
          ans[u] = now;
          ++tail;
        } else {
          W.insert(u);
        }
      } else
        break;
    };
    if (head > 0) {
      ans[q[head]] = max(ans[q[head]], ans[q[head - 1]]);
    }
    now = (ans[q[head]] += p);
    ;
    Q.erase(q[head++]);
    if (!W.empty()) {
      int u = *W.begin();
      if (Q.empty() || *Q.begin() > u) {
        W.erase(W.begin());
        Q.insert(u);
        q[tail] = u;
        ans[u] = now;
        ++tail;
      }
    };
  }
  for (decay<decltype(n + 1)>::type i = (1), _i = (n + 1); i < _i; ++i) {
    cout << ans[i] << " ";
  }
  cout << endl;
  return 0;
}
