#include <bits/stdc++.h>
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
const long long INF = 2e15;
const long long MOD = 1e9 + 7;
const long long MB = 20;
struct FenvikTree {
  vector<long long> t;
  FenvikTree(long long n) { t.resize(n + 1); }
  void update(long long i, long long delta) {
    i++;
    for (; i < t.size(); i += (i & (-i))) {
      t[i] += delta;
    }
  }
  long long get(long long i) {
    i++;
    long long res = 0;
    for (; i > 0; i -= (i & (-i))) {
      res += t[i];
    }
    return res;
  }
};
void solve() {
  long long n, p;
  cin >> n >> p;
  vector<pair<long long, long long>> a(n);
  for (long long i = 0; i < n; i++) {
    cin >> a[i].first;
    a[i].second = i;
  }
  sort(a.begin(), a.end());
  queue<long long> q;
  set<long long> waiting;
  FenvikTree tree(n);
  vector<long long> ans(n);
  long long now = 0;
  long long time = 0;
  long long id = 0;
  while (now < n) {
    if (q.empty() && waiting.empty()) {
      time = a[id].first + p;
      ans[a[id].second] = time;
      now++;
      long long w = a[id++].second;
      tree.update(w, 1);
      while (id < n && a[id].first <= time) {
        long long x = a[id].second;
        if (!tree.get(x)) {
          q.push(x);
          tree.update(x, 1);
        } else {
          waiting.insert(x);
        }
        id++;
      }
      tree.update(w, -1);
    }
    long long y = -1;
    if (!q.empty()) {
      y = q.front();
      q.pop();
      time += p;
      ans[y] = time;
      now++;
    }
    while (id < n && a[id].first <= time) {
      long long x = a[id].second;
      if (!tree.get(x)) {
        q.push(x);
        tree.update(x, 1);
      } else {
        waiting.insert(x);
      }
      id++;
    }
    if (y != -1) tree.update(y, -1);
    if (!waiting.empty()) {
      long long x = *waiting.begin();
      if (!tree.get(x)) {
        waiting.erase(x);
        tree.update(x, 1);
        q.push(x);
      }
    }
  }
  for (long long i : ans) cout << i << " ";
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  cout.precision(12);
  solve();
}
