#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 123;
set<pair<int, int> > s;
set<int> sq, ch;
queue<int> q;
long long finish[N], t[N];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  long long who = -1, when = -1, p;
  cin >> n >> p;
  for (int i = 0; i < (n); i++) {
    cin >> t[i];
    s.insert({t[i], i});
  }
  while (who != -1 or s.empty() == false) {
    if (who == -1) {
      auto now = *s.begin();
      s.erase(now);
      who = now.second;
      when = now.first + p;
      finish[now.second] = when;
      q.push(now.second);
      sq.insert(now.second);
    } else {
      while (s.empty() == false and (*s.begin()).first <= when) {
        auto now = *s.begin();
        s.erase(now);
        if (sq.empty() == true or (*sq.begin()) > now.second) {
          q.push(now.second);
          sq.insert(now.second);
        } else {
          ch.insert(now.second);
        }
      }
      int x = q.front();
      q.pop();
      sq.erase(x);
      if (ch.empty() == false and
          (sq.empty() == true or (*ch.begin()) < (*sq.begin()))) {
        auto now = *ch.begin();
        ch.erase(now);
        q.push(now);
        sq.insert(now);
      }
      if (q.empty() == true)
        who = -1;
      else {
        who = q.front();
        when = when + p;
        finish[who] = when;
      }
    }
  }
  for (int i = 0; i < (n); i++) cout << finish[i] << ' ';
  cout << endl;
  return 0;
}
