#include <bits/stdc++.h>
using namespace std;
const string __sep = "\n";
struct guy {
  int num;
  long long time;
};
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  long long p;
  cin >> n >> p;
  long long t[n];
  auto times_cmp = [](const guy& one, const guy& another) {
    if (one.time < another.time) return true;
    if (one.time > another.time) return false;
    return (one.num < another.num);
  };
  auto ready_cmp = [](const guy& one, const guy& another) {
    return (one.num < another.num);
  };
  set<guy, decltype(times_cmp)> times(times_cmp);
  set<guy, decltype(ready_cmp)> ready_to_go(ready_cmp);
  queue<guy> after_kip;
  set<guy, decltype(ready_cmp)> after_kipq(ready_cmp);
  for (int i = 0; i < n; ++i) {
    cin >> t[i];
    times.insert({i, t[i]});
  }
  long long ans[n];
  while (!times.empty() || !after_kip.empty()) {
    if (times.empty() || (!after_kip.empty() &&
                          (after_kip.front().time < (*(times.begin())).time))) {
      guy withsoup = after_kip.front();
      ans[withsoup.num] = withsoup.time;
      after_kip.pop();
      after_kipq.erase(after_kipq.find(withsoup));
      int firstnumgone = n + 1;
      if (!after_kipq.empty()) firstnumgone = (*(after_kipq.begin())).num;
      auto it = ready_to_go.begin();
      for (auto iter = ready_to_go.begin(); iter != ready_to_go.end();
           ++iter, ++it) {
        guy toinsert = *iter;
        if (!after_kip.empty()) {
          toinsert.time = after_kip.back().time + p;
        } else {
          toinsert.time = withsoup.time + p;
        }
        if (toinsert.num < firstnumgone) {
          after_kip.push(toinsert);
          after_kipq.insert(toinsert);
          firstnumgone = toinsert.num;
        } else {
          break;
        }
      }
      ready_to_go.erase(ready_to_go.begin(), it);
    } else {
      guy wantsoup = *(times.begin());
      int firstnumgone = n + 1;
      if (!after_kipq.empty()) firstnumgone = (*(after_kipq.begin())).num;
      if (firstnumgone < wantsoup.num) {
        ready_to_go.insert(wantsoup);
      } else {
        guy toinsert = wantsoup;
        if (!after_kip.empty()) {
          toinsert.time = after_kip.back().time + p;
        } else {
          toinsert.time += p;
        }
        after_kip.push(toinsert);
        after_kipq.insert(toinsert);
      }
      times.erase(times.begin());
    }
  }
  for (int i = 0; i < n; ++i) cout << ans[i] << " ";
  cout << endl;
  return 0;
}
