#include <bits/stdc++.h>
using namespace std;
const int MX = 100005;
int n, p;
long long act, fin, res[MX];
queue<int> q;
set<int> sq, dis;
multiset<pair<int, int> > mst;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> p;
  for (int i = 0; i < n; i++) {
    int t;
    cin >> t;
    mst.emplace(t, i);
  }
  while (mst.size() || q.size()) {
    while (mst.size() && mst.begin()->first == act) {
      dis.insert(mst.begin()->second);
      mst.erase(mst.begin());
    }
    if (q.size() && fin == act) {
      sq.erase(q.front());
      res[q.front()] = act;
      q.pop();
    }
    if (dis.size() && (sq.empty() || *sq.begin() > *dis.begin())) {
      q.push(*dis.begin());
      sq.insert(*dis.begin());
      dis.erase(dis.begin());
    }
    if (q.size() && fin <= act) fin = act + p;
    if (q.size() && mst.size()) {
      act = min(fin, 1ll * mst.begin()->first);
    } else if (q.size()) {
      act = fin;
    } else if (mst.size()) {
      act = mst.begin()->first;
    }
  }
  for (int i = 0; i < n; i++) cout << res[i] << " ";
  cout << '\n';
  return 0;
}
