#include <bits/stdc++.h>
using namespace std;
long long power(long long a, long long b, long long m = 1000000007) {
  if (b == 0) return 1;
  if (b == 1) return a;
  long long res = power(a, b / 2, m);
  res = (res * res) % m;
  if (b & 1) res = (res * a) % m;
  return res;
}
long long modinv(long long a, long long m = 1000000007) {
  return power(a, m - 2, m);
}
long long add(long long a, long long b, long long m = 1000000007) {
  return (a + b) % m;
}
long long sub(long long a, long long b, long long m = 1000000007) {
  return (a - b + m) % m;
}
long long mul(long long a, long long b, long long m = 1000000007) {
  return (a * b) % m;
}
void solve() {
  long long n, k, i = 0, c = 0, m = 0, p;
  cin >> n >> p;
  pair<long long, long long> a[n];
  long long ans[n];
  for (i = 0; i < n; i++) {
    cin >> a[i].first;
    a[i].second = i;
  }
  sort(a, a + n);
  priority_queue<long long> order;
  queue<long long> q;
  i = 0;
  while (c < n) {
    if (q.empty() && order.empty()) m = a[i].first;
    while (i < n && a[i].first <= (m + p)) {
      if (q.empty() || q.back() > a[i].second)
        q.push(a[i].second);
      else
        order.push(-a[i].second);
      i++;
    }
    c++;
    m += p;
    ans[q.front()] = m;
    q.pop();
    if (q.empty() && !order.empty()) {
      q.push(-order.top());
      order.pop();
    }
  }
  for (auto x : ans) cout << x << " ";
  cout << "\n";
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t = 1;
  while (t--) solve();
  return 0;
}
