#include <bits/stdc++.h>
using namespace std;
const int maxn = 100007;
int sum[maxn * 4];
int n;
struct Node {
  long long time;
  int type, index;
  bool operator<(const Node &rhs) const {
    if (time != rhs.time)
      return time > rhs.time;
    else if (type != rhs.type)
      return type < rhs.type;
    else
      return index > rhs.index;
  }
} pas[maxn];
long long ans[maxn];
int main() {
  long long p, time = 0;
  scanf("%d%I64d", &n, &p);
  priority_queue<Node> q;
  set<int> want, inq_s;
  for (int i = 1; i <= n; i++) {
    long long x;
    scanf("%I64d", &x);
    pas[i] = (Node){x, 1, i};
    q.push(pas[i]);
  }
  long long time_cur = 0, time_em = 0;
  while (q.size()) {
    Node now = q.top();
    q.pop();
    time_cur = now.time;
    if (now.type == 1) {
      want.insert(now.index);
    } else {
      int fro = now.index;
      inq_s.erase(fro);
    }
    while (want.size() &&
           (inq_s.empty() || (*want.begin()) < (*inq_s.begin()))) {
      int tmp = *want.begin();
      long long time_new = max(time_cur, time_em) + p;
      q.push((Node){time_new, 0, tmp});
      ans[tmp] = time_new;
      time_em = time_new;
      inq_s.insert(tmp);
      want.erase(tmp);
    }
  }
  for (int i = 1; i <= n; i++) printf("%I64d%c", ans[i], i == n ? '\n' : ' ');
  return 0;
}
