#include <bits/stdc++.h>
using namespace std;
int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (!isdigit(ch) && ch != '-') ch = getchar();
  if (ch == '-') f = -1, ch = getchar();
  while (isdigit(ch)) x = (x << 1) + (x << 3) + ch - '0', ch = getchar();
  return x * f;
}
void write(long long x) {
  if (x == 0) {
    putchar('0'), putchar(' ');
    return;
  }
  int f = 0;
  char ch[20];
  if (x < 0) putchar('-'), x = -x;
  while (x) ch[++f] = x % 10 + '0', x /= 10;
  while (f) putchar(ch[f--]);
  putchar(' ');
  return;
}
int n, tr[100007];
long long t[100007];
long long p, ans[100007], Q[100007], hd = 1, tl;
pair<long long, long long> a[100007];
priority_queue<int> q;
int lt(int x) { return x & (-x); }
void add(int x, int k) {
  for (; x <= n; x += lt(x)) tr[x] += k;
  return;
}
int ask(int x) {
  int k = 0;
  for (; x; x -= lt(x)) k += tr[x];
  return k;
}
int main() {
  n = read(), p = read();
  for (register int i = (1); i <= (n); ++i)
    t[i] = read(), a[i].first = t[i], a[i].second = i;
  sort(a + 1, a + n + 1);
  long long start = 0, tim = 0, now = 1;
  for (register int i = (1); i <= (n); ++i) {
    while (now <= n && a[now].first <= tim) {
      if (a[now].second < start && !ask(a[now].second))
        add(a[now].second, 1), Q[++tl] = now;
      else
        q.push(-a[now].second);
      now++;
    }
    if (hd <= tl)
      add(a[Q[hd]].second, -1), start = a[Q[hd]].second, hd++;
    else if (!q.empty())
      start = -q.top(), q.pop();
    else {
      start = a[now].second, tim = a[now].first, now++;
    }
    tim += p, ans[start] = tim;
  }
  for (register int i = (1); i <= (n); ++i) write(ans[i]);
  return 0;
}
