#include <bits/stdc++.h>
struct event {
  long long time;
  int type;
  int idx;
  bool operator<(const event& other) const {
    if (time == other.time)
      if (type == other.type)
        return idx > other.idx;
      else
        return type > other.type;
    return time > other.time;
  }
};
int N;
long long P;
long long ans[100005];
std::priority_queue<event> queue;
int AIB[100005];
void update(int pos, int val) {
  for (int i = pos; i <= N; i += (i & (-i))) AIB[i] += val;
}
int query(int pos) {
  int sum = 0;
  for (int i = pos; i > 0; i -= (i & (-i))) sum += AIB[i];
  return sum;
}
std::set<int> waiting;
long long timeQueueIsFree;
int main() {
  std::ios_base::sync_with_stdio(false);
  std::cin >> N >> P;
  long long x;
  for (int i = 1; i <= N; ++i) std::cin >> x, queue.push({x, 2, i});
  while (!queue.empty()) {
    auto top = queue.top();
    queue.pop();
    if (top.type == 2) {
      if (query(top.idx) == 0) {
        update(top.idx, 1);
        timeQueueIsFree = std::max(timeQueueIsFree + P, top.time + P);
        queue.push({timeQueueIsFree, 1, top.idx});
      } else {
        waiting.insert(top.idx);
      }
    } else {
      ans[top.idx] = top.time;
      update(top.idx, -1);
      auto it = waiting.begin();
      while (it != waiting.end()) {
        if (query(*it) == 0) {
          queue.push({top.time, 2, *it});
          it = waiting.erase(it);
          break;
        } else
          break;
      }
    }
  }
  for (int i = 1; i <= N; ++i) std::cout << ans[i] << ' ';
  return 0;
}
