#include <bits/stdc++.h>
using namespace std;
const double pi = 2 * acos(0.0);
const int dx[] = {-1, 0, 1, 0};
const int dy[] = {0, -1, 0, 1};
const int dx8[] = {-1, 0, 1, 0, 1, 1, -1, -1};
const int dy8[] = {0, -1, 0, 1, 1, -1, 1, -1};
long long min(long long a, long long b) {
  if (a < b) return a;
  return b;
}
long long max(long long a, long long b) {
  if (a > b) return a;
  return b;
}
long long ceil1(long long a, long long b) { return (a + b - 1) / b; }
void read(vector<long long>& arr) {
  for (long long i = 0; i < int(arr.size()); i++) cin >> arr[i];
}
void read_graph(vector<vector<long long>>& g, long long m) {
  while (m--) {
    long long x, y;
    cin >> x >> y;
    x--, y--;
    g[x].push_back(y);
    g[y].push_back(x);
  }
}
void solve() {
  int n;
  long long p;
  cin >> n >> p;
  vector<long long> arr(n);
  read(arr);
  vector<long long> ans(n);
  using node = pair<long long, pair<long long, long long>>;
  priority_queue<node, vector<node>, greater<node>> pq;
  for (int i = 0; i < n; i++) {
    pq.push({arr[i], {0, i}});
  }
  set<long long> want;
  set<long long> in_queue;
  long long ct = 0;
  while (!pq.empty()) {
    auto event = pq.top();
    pq.pop();
    long long t = event.first, ind = event.second.second;
    long long type = event.second.first;
    ct = max(ct, t);
    if (type == 0) {
      if (in_queue.empty() or *(in_queue.begin()) > ind) {
        pq.push({ct + p, {1, ind}});
        in_queue.insert(ind);
        ct += p;
      } else {
        want.insert(ind);
      }
    } else {
      in_queue.erase(ind);
      ans[ind] = t;
      while (!want.empty()) {
        auto a = *(want.begin());
        if (!in_queue.empty() and *(in_queue.begin()) < a) break;
        want.erase(a);
        in_queue.insert(a);
        pq.push({ct + p, {1, a}});
        ct += p;
      }
    }
  }
  for (auto a : ans) cout << a << " ";
  cout << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  solve();
}
