#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:32100000")
#pragma GCC optimize("O3")
using namespace std;
struct pt {
  long long t;
  bool type;
  int id;
};
bool operator<(const pt &a, const pt &b) {
  if (a.t != b.t) {
    return a.t > b.t;
  } else if (a.type != b.type) {
    return a.type < b.type;
  } else {
    return a.id > b.id;
  }
}
int n;
long long p;
long long arr[200005];
long long ans[200005];
priority_queue<pt> q;
set<int> inqueue, want;
long long qtime = 0;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin.sync_with_stdio(0);
  cout.sync_with_stdio(0);
  cout.precision(9);
  srand(time(0));
  cin >> n >> p;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    q.push({arr[i], 1, i});
  }
  while (q.size()) {
    long long time = q.top().t;
    bool type = q.top().type;
    int id = q.top().id;
    q.pop();
    if (type == 1) {
      want.insert(id);
    } else {
      inqueue.erase(id);
      ans[id] = time;
    }
    if (want.size() && (inqueue.empty() || *inqueue.begin() > *want.begin())) {
      q.push({max(time, qtime) + p, 0, *want.begin()});
      inqueue.insert(*want.begin());
      want.erase(want.begin());
      qtime = max(qtime, max(time, qtime) + p);
    }
  }
  for (int i = 0; i < n; i++) {
    cout << ans[i] << " ";
  }
  return 0;
}
