#include <bits/stdc++.h>
using namespace std;
template <typename S, typename T>
ostream& operator<<(ostream& out, pair<S, T> const& p) {
  out << '(' << p.first << ", " << p.second << ')';
  return out;
}
template <typename T>
ostream& operator<<(ostream& out, vector<T> const& v) {
  long long l = v.size();
  for (long long i = 0; i < l - 1; i++) out << v[i] << ' ';
  if (l > 0) out << v[l - 1];
  return out;
}
template <typename T>
ostream& operator<<(ostream& out, set<T> const& v) {
  for (auto i = v.begin(); i != v.end(); i++) out << (*i) << ' ';
  return out;
}
template <typename T>
void trace(const char* name, T&& arg1) {
  cout << name << " : " << arg1 << "\n";
}
template <typename T, typename... Args>
void trace(const char* names, T&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cout.write(names, comma - names) << " : " << arg1 << " | ";
  trace(comma + 1, args...);
}
const long long N = 1e5 + 100;
long long n, arr[N], p;
long long ans[N];
long long ind = 1;
long long times;
queue<long long> q;
set<pair<long long, long long> > inp;
set<long long> qs, waiting;
void adv(long long t) {
  while (!inp.empty() && (*inp.begin()).first <= t) {
    auto p = *inp.begin();
    inp.erase(inp.begin());
    if ((qs.empty() || p.second < *qs.begin()) &&
        (waiting.empty() || p.second < *waiting.begin())) {
      q.push(p.second);
      qs.insert(p.second);
    } else {
      waiting.insert(p.second);
    }
  }
}
int32_t main() {
  cin >> n >> p;
  for (long long i = 1; i <= n; i++) {
    cin >> arr[i];
    inp.insert({arr[i], i});
  }
  while (ind <= n) {
    adv(times);
    if (!q.empty()) {
      long long f = q.front();
      q.pop();
      ans[f] = times + p;
      ind++;
      times = times + p;
      adv(times - 1);
      qs.erase(f);
      adv(times);
      while (!waiting.empty()) {
        auto curr = *waiting.begin();
        if (qs.empty() || curr < *qs.begin()) {
          q.push(curr);
          qs.insert(curr);
          waiting.erase(curr);
        } else {
          break;
        }
      }
    } else {
      times = (*inp.begin()).first;
    }
  }
  for (long long i = 1; i <= n; i++) {
    cout << ans[i] << " ";
  }
  cout << "\n";
}
