#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, n, p;
  ios::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  cin >> n >> p;
  vector<pair<int, int> > t(n);
  vector<int> T(n);
  for (i = 0; i < n; i++) {
    cin >> t[i].first;
    t[i].second = i;
    T[i] = t[i].first;
  }
  sort(t.begin(), t.end());
  vector<long long> sol(n);
  set<int> inQ, waiting;
  queue<int> Q;
  long long last = 0;
  int cnt = 0;
  i = 0;
  while (cnt < n) {
    if (Q.size() == 0 && waiting.size()) {
      Q.push(*waiting.begin());
      inQ.insert(*waiting.begin());
      waiting.erase(waiting.begin());
    } else {
      if (Q.size()) {
        last = max(last, 1LL * T[Q.front()]) + p;
        int j = i;
        while (j < n && last >= t[j].first) {
          int pos = j;
          while (pos < n && t[j].first == t[pos].first) {
            waiting.insert(t[pos].second);
            pos++;
          }
          if (inQ.empty() || *inQ.begin() > *waiting.begin()) {
            Q.push(*waiting.begin());
            inQ.insert(*waiting.begin());
            waiting.erase(waiting.begin());
          }
          j = pos;
        }
        sol[Q.front()] = last;
        inQ.erase(Q.front());
        Q.pop(), cnt++;
        i = j;
      } else {
        int j = i;
        while (j < n && t[j].first == t[i].first) {
          waiting.insert(t[j].second);
          j++;
        }
        i = j;
      }
    }
  }
  for (i = 0; i < n; i++) {
    cout << sol[i] << " ";
  }
  return 0;
}
