#include <bits/stdc++.h>
using namespace std;
long long mo(const long long input, const long long ceil) {
  return input >= ceil ? input % ceil : input;
}
const int N = 1e5 + 50;
int n, p;
long long now, ans[N];
priority_queue<pair<int, int> > q1;
queue<int> q;
priority_queue<int> q2;
void solve(int tt) {
  scanf("%d%d", &n, &p);
  for (int i = 1, x; i <= n; i++) scanf("%d", &x), q1.push(make_pair(-x, -i));
  for (int i = 1; i <= n; i++) {
    if (q.empty()) now = -q1.top().first;
    now += p;
    while (q1.size() && -q1.top().first <= now) {
      if (q.empty() || q.back() > -q1.top().second)
        q.push(-q1.top().second);
      else
        q2.push(q1.top().second);
      q1.pop();
    }
    ans[q.front()] = now;
    q.pop();
    if (q2.size() && q.empty()) q.push(-q2.top()), q2.pop();
  }
  for (int i = 1; i <= n; i++) printf("%lld ", ans[i]);
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  int tt = 1;
  for (int i = 0; i < tt; i++) solve(tt);
  cerr << "\n\n\nTime : "
       << 1000 * (long double)clock() / (long double)CLOCKS_PER_SEC << "ms\n";
  ;
  return 0;
}
