#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
struct node {
  int id, t;
  bool operator<(node b) const { return id > b.id; }
};
node a[N];
long long ans[N];
bool cmp(node a, node b) {
  if (a.t != b.t) return a.t < b.t;
  return a.id < b.id;
}
priority_queue<node> qq, qqq;
queue<int> q;
int n, p, c[N], vis[N];
void add(int x, int v) {
  for (int i = x; i <= n; i += x & -x) {
    c[i] += v;
  }
}
int query(int x) {
  int re = 0;
  for (int i = x; i > 0; i -= x & -x) {
    re += c[i];
  }
  return re;
}
int main() {
  scanf("%d%d", &n, &p);
  for (int i = 1; i <= n; i++) {
    a[i].id = i;
    scanf("%d", &a[i].t);
  }
  sort(a + 1, a + n + 1, cmp);
  long long t = 0;
  for (int i = 1;;) {
    if (!qq.empty()) {
      node top = qq.top();
      while (!qqq.empty() && !vis[qqq.top().id]) {
        qqq.pop();
      }
      if (qqq.empty() || qq.top().id < qqq.top().id) {
        q.push(top.id);
        vis[top.id] = 1;
        qqq.push(qq.top());
        qq.pop();
      }
    }
    if (!q.empty()) {
      int top = q.front();
      q.pop();
      t += p;
      ans[top] = t;
      vis[top] = 0;
    }
    if (q.empty() && qq.empty()) {
      if (i == n + 1) break;
      t = max(t, 1ll * a[i].t);
    }
    while (i <= n && t >= a[i].t) {
      if (qqq.empty()) {
        q.push(a[i].id);
        vis[a[i].id] = 1;
        qqq.push(a[i]);
      } else if (!qqq.empty() && a[i].id < qqq.top().id) {
        q.push(a[i].id);
        vis[a[i].id] = 1;
        qqq.push(a[i]);
      } else {
        qq.push(a[i]);
      }
      i++;
    }
  }
  for (int i = 1; i <= n; i++) {
    printf("%lld ", ans[i]);
  }
}
