#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 100;
long long p;
int n;
int a[maxn];
int pos[maxn];
long long ans[maxn];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> p;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    pos[i] = i;
  }
  sort(pos, pos + n, [&](int b, int c) {
    if (a[b] == a[c]) return b < c;
    return a[b] < a[c];
  });
  long long t = 0;
  priority_queue<int> q;
  queue<int> qq;
  set<int> s;
  int ind = 0;
  while (ind < n) {
    t = a[pos[ind]];
    qq.push(pos[ind]);
    s.insert(pos[ind]);
    ++ind;
    while (qq.size()) {
      int tmp = qq.front();
      qq.pop();
      t += p;
      ans[tmp] = t;
      while (ind < n && a[pos[ind]] <= t) {
        if (pos[ind] < *s.begin()) {
          qq.push(pos[ind]);
          s.insert(pos[ind]);
        } else {
          q.push(-pos[ind]);
        }
        ++ind;
      }
      s.erase(tmp);
      while (q.size() && (qq.size() == 0 || -q.top() < *s.begin())) {
        qq.push(-q.top());
        s.insert(-q.top());
        q.pop();
      }
    }
  }
  for (int i = 0; i < n; ++i) {
    cout << ans[i] << " ";
  }
  cout << endl;
  return 0;
}
