#include <bits/stdc++.h>
using namespace std;
long long n, p, ans[100005], now;
map<long long, set<long long>> waiting;
set<long long> inqu, waqu;
deque<long long> qu;
bool usig = 0;
int main() {
  cin >> n >> p;
  for (int i = 0; i < n; i++) {
    long long a;
    cin >> a;
    waiting[a].insert(i);
  }
  while (waiting.size() || waqu.size() || inqu.size()) {
    if (waiting.size()) {
      long long ot = waiting.begin()->first;
      now = ot;
      for (long long oper : waiting[ot]) {
        if (oper != -1) {
          waqu.insert(oper);
        } else {
          ans[qu.front()] = ot;
          inqu.erase(-qu.front());
          qu.pop_front();
          usig = 0;
        }
      }
      waiting.erase(ot);
    }
    if (waqu.size()) {
      long long closest = *waqu.begin();
      if (inqu.upper_bound(-closest) == inqu.end()) {
        qu.push_back(closest);
        inqu.insert(-closest);
        waqu.erase(closest);
      }
    }
    if (qu.size() && !usig) {
      waiting[now + p].insert(-1);
      usig = 1;
    }
  }
  for (int i = 0; i < n; i++) cout << ans[i] << ' ';
  cout << '\n';
  return 0;
}
