#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 5;
int n;
long long p;
struct node {
  long long val;
  int id;
  friend bool operator<(node A, node B) { return A.id > B.id; }
} E[MAXN], st[MAXN];
long long ans[MAXN];
bool cmp(node A, node B) {
  if (A.val == B.val)
    return A.id < B.id;
  else
    return A.val < B.val;
}
priority_queue<node> que;
int main() {
  cin >> n >> p;
  for (int i = 1; i <= n; i++) scanf("%lld", &E[i].val), E[i].id = i;
  sort(E + 1, E + 1 + n, cmp);
  int l = 1, r = 0;
  long long nowp = 0;
  int now = 1;
  while (l <= n) {
    if (!que.empty() && l > r) {
      node t = que.top();
      que.pop();
      st[++r] = t;
    }
    if (l > r && now <= n) {
      st[++r] = E[now];
      nowp = E[now].val;
      now++;
    }
    nowp = nowp + p;
    ans[st[l].id] = nowp;
    for (int i = now; i <= n; i++) {
      if (E[i].val <= nowp) {
        if (E[i].id < st[r].id)
          st[++r] = E[i];
        else
          que.push(E[i]);
        if (i == n) {
          now = n + 1;
          break;
        }
      } else {
        now = i;
        break;
      }
    }
    l++;
  }
  for (int i = 1; i <= n; i++) printf("%lld ", ans[i]);
  return 0;
}
