#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100010;
const long long LINF = 1ll << 60;
int T[MAXN];
int ts[MAXN];
long long ans[MAXN];
int bit[MAXN];
int gbit(int x) {
  int ans = 0;
  for (x += 5; x; x -= ((x) & (-(x)))) ans += bit[x];
  return ans;
}
void updbit(int x, int z) {
  for (x += 5; x < MAXN; x += ((x) & (-(x)))) bit[x] += z;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int N, P;
  cin >> N >> P;
  for (int i = 0; i < N; i++) cin >> T[i];
  for (int i = 0; i < N; i++) ts[i] = i;
  sort(ts, ts + N, [&](const int a, const int b) {
    return T[a] != T[b] ? T[a] < T[b] : a < b;
  });
  long long w = LINF;
  int p = 0;
  queue<int> q;
  priority_queue<int, vector<int>, greater<int>> pq;
  while (p < N || !q.empty()) {
    if (p < N && T[ts[p]] <= w) {
      if (gbit(ts[p]) == 0) {
        if (q.empty()) w = T[ts[p]] + P;
        updbit(ts[p], 1);
        q.push(ts[p]);
      } else
        pq.push(ts[p]);
      p++;
    } else {
      ans[q.front()] = w;
      updbit(q.front(), -1);
      q.pop();
      if (!pq.empty() && gbit(pq.top()) == 0) {
        q.push(pq.top());
        updbit(pq.top(), 1);
        pq.pop();
      }
      if (q.empty())
        w = LINF;
      else
        w += P;
    }
  }
  for (int i = 0; i < N; i++) cout << ans[i] << " ";
  return 0;
}
