#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5;
int n, p, a;
long long cur;
queue<int> q;
multiset<pair<int, int> > sp;
multiset<int> si;
vector<long long> ans(maxn);
void proc1() {
  if (sp.empty()) return;
  a = sp.begin()->second;
  cur = sp.begin()->first;
  sp.erase(sp.begin());
  q.push(a);
}
void proc2() {
  cur += p;
  while (!sp.empty() && sp.begin()->first <= cur) {
    a = sp.begin()->second;
    if (q.empty() || a < q.back())
      q.push(a);
    else
      si.insert(a);
    sp.erase(sp.begin());
  }
}
void proc3() {
  ans[q.front()] = cur;
  q.pop();
  if (q.empty()) {
    if (!si.empty()) {
      q.push(*si.begin());
      si.erase(si.begin());
    } else {
      proc1();
    }
  }
}
signed main() {
  cin >> n >> p;
  for (int i = 0; i < n; ++i) {
    cin >> a;
    sp.insert(make_pair(a, i));
  }
  proc1();
  while ((!si.empty()) || (!sp.empty()) || (!q.empty())) {
    proc2();
    proc3();
  }
  for (int i = 0; i < n; ++i) cout << ans[i] << ' ';
  cout << endl;
}
