#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
const long double PI = 3.141592653589793238;
const long long pi = 31415926;
const long long inf = 1000000000000000000;
const long long small_inf = 100000000000000;
long long int modpow(long long int x, long long int n,
                     long long int mod = MOD) {
  long long int res = 1;
  while (n > 0) {
    if (n & 1) res = res * x % mod;
    x = x * x % MOD;
    n >>= 1;
  }
  return res;
}
long long int power(long long int x, long long int n) {
  long long int res = 1;
  while (n > 0) {
    if (n & 1) res = res * x;
    x = x * x;
    n >>= 1;
  }
  return res;
}
void init() {}
void solve() {
  int n;
  long long int p1;
  cin >> n >> p1;
  vector<pair<long long int, int>> v(n);
  for (int i = 0; i < n; i++) {
    cin >> v[i].first;
    v[i].second = i + 1;
  }
  sort(v.begin(), v.end());
  set<int> q;
  set<int> wait;
  set<pair<long long int, pair<int, int>>> s;
  for (int i = 0; i < n; i++) {
    s.insert(make_pair(v[i].first, make_pair(1, v[i].second)));
  }
  std::vector<long long int> ans(n + 1, 0);
  long long cur = 0, que = 0;
  int fill = 0;
  while (!s.empty()) {
    auto p = *s.begin();
    if (p.second.first == 0) {
      q.erase(p.second.second);
    }
    if (p.second.first == 1) {
      wait.insert(p.second.second);
    }
    cur = p.first;
    s.erase(s.begin());
    if (!wait.empty() && (q.empty() || *wait.begin() < *q.begin()) &&
        (s.empty() || (*s.begin()).first != cur)) {
      int xx = *wait.begin();
      q.insert(*wait.begin());
      wait.erase(wait.begin());
      que = max(cur, que) + p1;
      s.insert(make_pair(que, make_pair(0, xx)));
      ans[xx] = que;
    }
  }
  for (int i = 1; i <= n; i++) cout << ans[i] << " ";
  cout << endl;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  int t23 = 1, tt23 = 1;
  init();
  while (tt23 <= t23) {
    solve();
    tt23++;
  }
  cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC
       << "ms\n";
}
