#include <bits/stdc++.h>
using namespace std;
const int maxN = 1e6 + 10;
int tt[maxN];
long long ans[maxN];
priority_queue<pair<int, int>, vector<pair<int, int> >,
               greater<pair<int, int> > >
    P;
priority_queue<int, vector<int>, greater<int> > PQ;
deque<int> Q;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t = 0;
  int n, p;
  cin >> n >> p;
  for (int i = 0; i < n; i++) {
    cin >> tt[i];
    P.push(make_pair(tt[i], i));
  }
  long long last = 0;
  while (1) {
    while (!P.empty()) {
      pair<int, int> p = P.top();
      if (p.first <= t) {
        if (p.first < t && p.second < Q.back())
          Q.push_back(p.second);
        else
          PQ.push(p.second);
        P.pop();
      } else
        break;
    }
    while (!PQ.empty()) {
      int pq = PQ.top();
      if (Q.empty() || pq < Q.back()) {
        PQ.pop();
        Q.push_back(pq);
      } else
        break;
    }
    if (!Q.empty()) {
      int q = Q.front();
      Q.pop_front();
      ans[q] = t + p;
      t += p;
    } else if (!P.empty()) {
      t = P.top().first;
    } else
      break;
  }
  for (int i = 0; i < n; i++) {
    cout << ans[i] << " ";
  }
  cout << endl;
  return 0;
}
