#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
const int INF = 0x3f3f3f3f, N = 1e5 + 5;
int n, p;
ll ans[N], now;
struct node {
  int t, id;
  bool operator<(const node &a) const { return id > a.id; }
} x[N];
priority_queue<node> pq;
queue<node> q;
int c[N];
void update(int x, int v) {
  for (int i = x; i <= n; i += (i & -i)) c[i] += v;
}
bool query(int x) {
  int ans = 0;
  for (int i = x; i > 0; i -= (i & -i)) ans += c[i];
  return ans == 0;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> p;
  for (int i = 1; i <= n; i++) {
    cin >> x[i].t;
    x[i].id = i;
  }
  sort(x + 1, x + n + 1,
       [](node a, node b) { return a.t == b.t ? a.id < b.id : a.t < b.t; });
  int use = 0;
  while (use < n || !q.empty() || !pq.empty()) {
    if (pq.empty() && q.empty()) {
      use++;
      now = x[use].t;
      update(x[use].id, 1);
      q.push(x[use]);
    }
    if (q.empty() && !pq.empty()) {
      update(pq.top().id, 1);
      q.push(pq.top());
      pq.pop();
    }
    if (!q.empty()) {
      now += p;
      node tmp = q.front();
      q.pop();
      ans[tmp.id] = now;
      ;
      while (use < n && x[use + 1].t <= now) {
        use++;
        if (query(x[use].id - 1)) {
          q.push(x[use]);
          update(x[use].id, 1);
        } else
          pq.push(x[use]);
      }
      update(tmp.id, -1);
      while (pq.size() && query(pq.top().id - 1)) {
        q.push(pq.top());
        update(pq.top().id, 1);
        pq.pop();
      }
    }
  }
  for (int i = 1; i <= n; i++) cout << ans[i] << ' ';
  return 0;
}
