#include <bits/stdc++.h>
using namespace std;
long long MAX = 100000000000000000;
pair<long long, long long> tree[100005 * 4];
long long arr[100005];
void build(int node, int b, int e) {
  if (b == e) {
    tree[node] = make_pair(arr[b], (long long)b);
    return;
  }
  int left = 2 * node, right = left + 1, mid = (b + e) / 2;
  build(left, b, mid);
  build(right, mid + 1, e);
  if (tree[left].first <= tree[right].first)
    tree[node] = tree[left];
  else
    tree[node] = tree[right];
}
void update(int node, int b, int e, int i, long long v) {
  if (b > i || e < i) return;
  if (b == e && b == i) {
    tree[node].first = v;
    return;
  }
  int left = 2 * node, right = left + 1, mid = (b + e) / 2;
  update(left, b, mid, i, v);
  update(right, mid + 1, e, i, v);
  if (tree[left].first <= tree[right].first)
    tree[node] = tree[left];
  else
    tree[node] = tree[right];
}
pair<long long, long long> query1(int node, int b, int e, int l, int r) {
  if (b > r || e < l) return make_pair(MAX, MAX);
  if (b >= l && e <= r) return tree[node];
  int left = 2 * node, right = left + 1, mid = (b + e) / 2;
  pair<long long, long long> ret;
  pair<long long, long long> p = query1(left, b, mid, l, r);
  pair<long long, long long> q = query1(right, mid + 1, e, l, r);
  if (p.first <= q.first)
    ret = p;
  else
    ret = q;
  return ret;
}
int query2(int node, int b, int e, long long v) {
  if (b == e) return b;
  int left = 2 * node, right = left + 1, mid = (b + e) / 2;
  int ret;
  if (tree[left].first <= v)
    ret = query2(left, b, mid, v);
  else
    ret = query2(right, mid + 1, e, v);
  return ret;
}
long long ans[100005];
int main() {
  int n;
  long long p;
  scanf("%d %lld", &n, &p);
  for (int i = 1; i <= n; i++) scanf("%lld", &arr[i]);
  build(1, 1, n);
  long long Tm = 0;
  while (tree[1].first < MAX) {
    Tm = max(Tm, tree[1].first);
    int id = query2(1, 1, n, Tm);
    update(1, 1, n, id, MAX);
    Tm += p;
    ans[id] = Tm;
    id--;
    while (id > 0) {
      pair<long long, long long> zz = query1(1, 1, n, 1, id);
      if (zz.first > Tm) break;
      Tm += p;
      ans[zz.second] = Tm;
      update(1, 1, n, zz.second, MAX);
      id = zz.second - 1;
    }
  }
  for (int i = 1; i <= n; i++) printf("%lld ", ans[i]);
}
