#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
const int INF = 0x3f3f3f3f;
pair<long long, long long> mn[maxn * 4], mx[maxn * 4], arr[maxn];
long long answer[maxn];
void push_up(int rt) { mn[rt] = min(mn[rt << 1], mn[rt << 1 | 1]); }
void build(int rt, int l, int r) {
  if (l == r) {
    mn[rt].first = mx[rt].first = arr[l].second;
    mn[rt].second = mx[rt].second = l;
    return;
  }
  int mid = (l + r) / 2;
  build(rt << 1, l, mid);
  build(rt << 1 | 1, mid + 1, r);
  push_up(rt);
}
void update(int rt, int l, int r, int pos) {
  if (l == r) {
    mn[rt].first = INF;
    mx[rt].first = INF;
    return;
  }
  int mid = (l + r) / 2;
  if (pos <= mid)
    update(rt << 1, l, mid, pos);
  else
    update(rt << 1 | 1, mid + 1, r, pos);
  push_up(rt);
}
pair<long long, long long> query_min(int rt, int l, int r, int ql, int qr) {
  if (ql <= l && qr >= r) {
    return mn[rt];
  }
  int mid = (l + r) / 2;
  pair<long long, long long> ans = pair<long long, long long>(INF, INF);
  if (ql <= mid) ans = min(ans, query_min(rt << 1, l, mid, ql, qr));
  if (qr > mid) ans = min(ans, query_min(rt << 1 | 1, mid + 1, r, ql, qr));
  return ans;
}
pair<long long, long long> query_max(int rt, int l, int r, int ql, int qr,
                                     int val) {
  if (l == r) {
    if (mn[rt].first > val)
      return pair<long long, long long>(INF, INF);
    else
      return mn[rt];
  }
  if (ql <= l && qr >= r) {
    if (mn[rt].first > val) return pair<long long, long long>(INF, INF);
  }
  int mid = (l + r) / 2;
  pair<long long, long long> ans = pair<long long, long long>(INF, INF);
  if (ql <= mid) ans = min(ans, query_max(rt << 1, l, mid, ql, qr, val));
  if (ans.first <= val) return ans;
  if (qr > mid) ans = query_max(rt << 1 | 1, mid + 1, r, ql, qr, val);
  return ans;
}
int find_low_pos(long long now, int n) {
  return lower_bound(arr + 1, arr + n + 1, pair<long long, long long>(now, 0)) -
         arr;
}
int find_up_pos(long long now, int n) {
  return upper_bound(arr + 1, arr + n + 1,
                     pair<long long, long long>(now, INF)) -
         arr - 1;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, p;
  cin >> n >> p;
  long long mn = INF;
  for (int i = 1; i <= n; i++) {
    cin >> arr[i].first;
    arr[i].second = i;
    mn = min(mn, arr[i].first);
  }
  sort(arr + 1, arr + n + 1);
  build(1, 1, n);
  long long now = mn, r;
  int x = 0;
  while (true) {
    int pos = find_up_pos(now, n);
    long long temp = now;
    pair<long long, long long> ans = query_min(1, 1, n, 1, pos);
    if (ans.first == INF) {
      ans = query_max(1, 1, n, pos, n, INF - 1);
      if (ans.first == INF) break;
      update(1, 1, n, ans.second);
      temp = arr[ans.second].first + p;
      answer[ans.first] = temp;
      r = ans.first - 1;
    } else {
      update(1, 1, n, ans.second);
      temp += p;
      answer[ans.first] = temp;
      r = ans.first - 1;
    }
    x++;
    while (true) {
      if (r == 0) break;
      pos = find_low_pos(max(now, arr[ans.second].first + 1), n);
      int pos2 = find_up_pos(temp, n);
      if (pos > pos2) break;
      ans = query_max(1, 1, n, pos, pos2, r);
      if (ans.first == INF) break;
      update(1, 1, n, ans.second);
      temp += p;
      answer[ans.first] = temp;
      r = ans.first - 1;
    }
    now = temp;
  }
  for (int i = 1; i <= n; i++) {
    cout << answer[i] << " ";
  }
}
