#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  long long p;
  cin >> n >> p;
  vector<pair<long long, int>> num(n);
  vector<long long> ans(n);
  queue<int> start;
  set<pair<int, long long>> equal;
  for (int i = 0; i < n; ++i) {
    cin >> num[i].first;
    num[i].second = i;
  }
  sort(num.begin(), num.end());
  int idx = 0;
  long long time, up;
  while (idx < n || !start.empty() || !equal.empty()) {
    if (start.empty() && equal.empty()) {
      start.push(num[idx].second);
      time = num[idx].first;
      up = 0;
      ++idx;
    }
    if (!equal.empty() && start.empty()) {
      start.push(equal.begin()->first);
      equal.erase(equal.begin());
    }
    up += p;
    while (idx < n && num[idx].first <= time + up) {
      if (num[idx].second < start.back())
        start.push(num[idx].second);
      else
        equal.insert({num[idx].second, num[idx].first});
      ++idx;
    }
    ans[start.front()] = time + up;
    start.pop();
  }
  for (auto a : ans) cout << a << " ";
  return 0;
}
