#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long long MOD2 = 998244353;
const long long N = 2e5 + 5;
const long double pi = 3.14159265359;
long long n, p, x, u[N], ti;
priority_queue<pair<long long, long long>, vector<pair<long long, long long> >,
               greater<pair<long long, long long> > >
    a;
queue<long long> b;
set<long long> c;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> p;
  for (long long i = 1; i <= n; i++) {
    cin >> x;
    a.push(make_pair(x, i));
  }
  for (long long i = 1; i <= n; i++) {
    if ((long long)b.size() == 0 && (long long)c.size() == 0) {
      ti = a.top().first;
    }
    ti += p;
    while ((long long)a.size() && a.top().first <= ti) {
      if ((long long)b.size() == 0 || b.back() > a.top().second)
        b.push(a.top().second);
      else
        c.insert(a.top().second);
      a.pop();
    }
    u[b.front()] = ti;
    b.pop();
    if ((long long)b.size() == 0 && (long long)c.size()) {
      b.push(*c.begin());
      c.erase(c.begin());
    }
  }
  for (long long i = 1; i <= n; i++) cout << u[i] << (i == n ? "\n" : " ");
  return 0;
}
