#include <bits/stdc++.h>
using namespace std;
struct node {
  int id;
  long long start;
  friend bool operator<(const node x, const node y) { return x.id > y.id; }
} psger[100005];
bool cmp(const node x, const node y) {
  if (x.start == y.start) return x.id < y.id;
  return x.start < y.start;
}
priority_queue<node> pq;
queue<node> q;
set<int> st;
long long ret[100005];
int n;
long long p, now, pos;
int main() {
  cin >> n >> p;
  for (int i = 1; i <= n; ++i) {
    cin >> psger[i].start;
    psger[i].id = i;
  }
  sort(psger + 1, psger + 1 + n, cmp);
  pos = 1;
  now = psger[1].start;
  st.insert(n + 1);
  while (pos <= n || !q.empty() || !pq.empty()) {
    if (!q.empty()) {
      node tmp = q.front();
      q.pop();
      now += p;
      ret[tmp.id] = now;
      while (pos <= n && psger[pos].start < now) {
        if (psger[pos].id < *st.begin()) {
          st.insert(psger[pos].id);
          q.push(psger[pos++]);
        } else
          pq.push(psger[pos++]);
      }
      st.erase(tmp.id);
    }
    if (pq.empty() && q.empty()) now = max(now, psger[pos].start);
    while (pos <= n && psger[pos].start <= now) pq.push(psger[pos++]);
    int t = *st.begin();
    if (!pq.empty() && pq.top().id <= t) {
      q.push(pq.top());
      st.insert(pq.top().id);
      pq.pop();
    }
  }
  for (int i = 1; i <= n; ++i) {
    if (i != 1) printf(" ");
    printf("%lld", ret[i]);
  }
  return 0;
}
