#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e6 + 100;
priority_queue<pair<int, int> > a;
queue<int> b;
set<int> d;
long long int h[MAXN];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int j, n, p, x;
  long long int now = 0;
  cin >> n >> p;
  for (int i = 1; i <= n; ++i) {
    cin >> x;
    a.push(make_pair(-x, -i));
  }
  for (int i = 1; i <= n; ++i) {
    if (b.empty() && d.empty()) {
      now = -a.top().first;
    }
    now += p;
    while (!a.empty() && -a.top().first <= now) {
      if (b.empty() || -a.top().second < b.back()) {
        b.push(-a.top().second);
      } else {
        d.insert(-a.top().second);
      }
      a.pop();
    }
    h[b.front()] = now;
    b.pop();
    if (b.empty() && !d.empty()) {
      b.push(*d.begin());
      d.erase(d.begin());
    }
  }
  for (int i = 1; i <= n; ++i) {
    cout << h[i] << ' ';
  }
  return 0;
}
