#include <bits/stdc++.h>
using namespace std;
using LL = long long;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, t;
  cin >> n >> t;
  vector<LL> x(n);
  vector<pair<LL, int>> y;
  for (int i = 0; i < n; ++i) {
    cin >> x[i];
    y.push_back({x[i], i});
  }
  sort(y.begin(), y.end());
  vector<LL> ans(n);
  set<int> s;
  queue<int> q;
  set<int> qs;
  LL now = 0;
  int shoulderase = -1;
  for (int i = 0; i < n;) {
    while (i < n && y[i].first < now) {
      if (qs.empty() || *qs.begin() > y[i].second) {
        q.push(y[i].second);
        qs.insert(y[i].second);
      } else {
        s.insert(y[i].second);
      }
      ++i;
    }
    while (i < n && y[i].first == now) {
      s.insert(y[i].second);
      ++i;
    }
    if (shoulderase != -1) {
      qs.erase(shoulderase);
      shoulderase = -1;
    }
    if (!s.empty()) {
      int a = *s.begin();
      if (qs.empty() || *qs.begin() > a) {
        q.push(a);
        qs.insert(a);
        s.erase(a);
      }
    }
    if (!q.empty()) {
      int a = q.front();
      q.pop();
      ans[a] = now + t;
      now += t;
      shoulderase = a;
    } else {
      now = y[i].first;
      continue;
    }
  }
  while (!q.empty()) {
    int a = q.front();
    q.pop();
    qs.erase(a);
    ans[a] = now + t;
    now += t;
    if (!s.empty()) {
      int a = *s.begin();
      if (qs.empty() || *qs.begin() > a) {
        q.push(a);
        qs.insert(a);
        s.erase(a);
      }
    }
  }
  while (!s.empty()) {
    int a = *s.begin();
    s.erase(s.begin());
    ans[a] = now + t;
    now += t;
  }
  for (int i = 0; i < n; ++i) cout << ans[i] << " ";
  cout << endl;
  return 0;
}
