#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, p;
  cin >> n >> p;
  vector<pair<int, int>> v(n);
  for (int i = 0; i < n; ++i) {
    cin >> v[i].first;
    v[i].second = i;
  }
  sort(v.begin(), v.end());
  queue<int> q;
  set<int> in_queue, waiting;
  vector<long long> ans(n);
  auto AddInQueue = [&](int x) {
    in_queue.emplace(x);
    q.emplace(x);
  };
  auto EraseFromQueue = [&](int x) {
    in_queue.erase(x);
    assert(q.front() == x);
    q.pop();
  };
  auto CanAdd = [&](int x) {
    return in_queue.empty() || *in_queue.begin() > x;
  };
  int idx = 0;
  long long fin_time = 0;
  while (!in_queue.empty() || !waiting.empty() || idx < n) {
    while (idx < n && (in_queue.empty() || v[idx].first <= fin_time)) {
      if (CanAdd(v[idx].second)) {
        if (in_queue.empty()) fin_time = v[idx].first + p;
        AddInQueue(v[idx].second);
      } else {
        waiting.emplace(v[idx].second);
      }
      ++idx;
    }
    if (!q.empty()) {
      ans[q.front()] = fin_time;
      EraseFromQueue(q.front());
      fin_time += p;
      while (!waiting.empty() && CanAdd(*waiting.begin())) {
        in_queue.emplace(*waiting.begin());
        q.emplace(*waiting.begin());
        waiting.erase(waiting.begin());
      }
    }
  }
  for (auto &x : ans) {
    cout << x << ' ';
  }
  cout << endl;
}
