#include <bits/stdc++.h>
using namespace std;
const int maxn = 100005;
int n, P, que[maxn], t[maxn];
set<int> s;
long long ans[maxn], nowt;
struct node {
  int x, id;
  bool operator<(const node &b) const {
    return x < b.x || (x == b.x && id < b.id);
  }
} a[maxn];
int fk(set<int>::iterator it) {
  int p = (*it);
  s.erase(it);
  return p;
}
int main() {
  scanf("%d%d", &n, &P);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i].x), t[i] = a[i].x, a[i].id = i;
  sort(a + 1, a + 1 + n);
  int head = 0, tail = 0, r = 1;
  while (head != tail || r <= n || s.size()) {
    if (head == tail) {
      if (s.size())
        que[++tail] = fk(s.begin());
      else
        que[++tail] = a[r++].id;
    }
    int x = que[++head];
    nowt = max(nowt, 1ll * t[x]) + P, ans[x] = nowt;
    while (a[r].x <= nowt && r <= n) {
      if (a[r].id < que[tail])
        que[++tail] = a[r].id;
      else
        s.insert(a[r].id);
      r++;
    }
  }
  for (int i = 1; i <= n; i++) printf("%lld ", ans[i]);
  puts("");
  return 0;
}
