#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 3;
int n, p, a[N];
long long t[N * 4], ans[N];
pair<long long, int> m[N * 4];
void upd(int pos, long long val, int v = 1, int tl = 1, int tr = n) {
  if (tl == tr) {
    t[v] = val;
    m[v] = {val, tl};
  } else {
    int tm = (tl + tr) >> 1;
    if (pos <= tm)
      upd(pos, val, v << 1, tl, tm);
    else
      upd(pos, val, v << 1 | 1, tm + 1, tr);
    t[v] = min(t[v << 1], t[v << 1 | 1]);
    m[v] = min(m[v << 1], m[v << 1 | 1]);
  }
}
int get(long long cur, int v = 1, int tl = 1, int tr = n) {
  if (tl == tr) return tl;
  int tm = (tl + tr) >> 1;
  if (t[v << 1] <= cur) return get(cur, v << 1, tl, tm);
  return get(cur, v << 1 | 1, tm + 1, tr);
}
pair<long long, int> get_min(int l, int r, int v = 1, int tl = 1, int tr = n) {
  if (l > tr || tl > r) return {1e18 + 5, 5};
  if (l <= tl && tr <= r) return m[v];
  int tm = (tl + tr) >> 1;
  return min(get_min(l, r, v << 1, tl, tm),
             get_min(l, r, v << 1 | 1, tm + 1, tr));
}
int main() {
  cin >> n >> p;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    upd(i, a[i]);
  }
  queue<int> q;
  set<int> st;
  long long cur = 0;
  for (int i = 1; i <= n; i++) {
    if (q.empty()) {
      int pos = get(max(cur, t[1]));
      cur = max(t[1], cur);
      st.insert(pos);
      q.push(pos);
    }
    while (1) {
      int mn = *st.begin();
      if (mn == 1) break;
      pair<long long, int> pr = get_min(1, mn - 1);
      if (pr.first < cur + p) {
        q.push(pr.second);
        st.insert(pr.second);
      } else
        break;
    }
    int x = q.front();
    st.erase(x);
    q.pop();
    cur += p;
    ans[x] = cur;
    upd(x, 1e18);
  }
  for (int i = 1; i <= n; i++) {
    cout << ans[i] << " ";
  }
}
