#include <bits/stdc++.h>
using namespace std;
long long ans[100005];
map<long long, vector<int>> h;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, p;
  cin >> n >> p;
  vector<int> st(n);
  set<long long> events;
  for (int i = 0; i < n; i++) {
    cin >> st[i];
    events.insert(st[i]);
    h[st[i]].push_back(i);
  }
  deque<int> q;
  set<int> qp, ready;
  for (auto it = events.begin(); it != events.end(); it++) {
    long long x = *it;
    while (q.size() && ans[q.front()] <= x) {
      qp.erase(q.front());
      q.pop_front();
    }
    if (h.find(x) != h.end())
      for (auto y : h[x]) {
        ready.insert(y);
      }
    if (ready.empty()) continue;
    int pot = *ready.begin();
    if (qp.empty() || *qp.begin() > pot) {
      ready.erase(ready.begin());
      if (q.size()) {
        ans[pot] = ans[q.back()] + p;
      } else {
        ans[pot] = x + p;
      }
      q.push_back(pot);
      qp.insert(pot);
      events.insert(ans[pot]);
    }
  }
  for (int i = 0; i < n; i++) {
    cout << ans[i] << " ";
  }
  cout << endl;
  return 0;
}
