#include <bits/stdc++.h>
using namespace std;
void _co() { cout << '\n'; }
template <typename T, typename... Ts>
void _co(const T& value, const Ts&... values) {
  cout << ' ' << value;
  _co(values...);
}
template <typename T, typename... Ts>
void co(const T& value, const Ts&... values) {
  cout << "deb: " << value;
  _co(values...);
}
const long long N = 1e5 + 5;
struct Event {
  long long time, id, type;
  bool operator<(const Event& that) const {
    if (time != that.time) return time > that.time;
    if (type != that.type) return type > that.type;
    return id > that.id;
  }
};
long long n, p;
priority_queue<Event> pq;
long long ans[N];
long long arr[N];
queue<long long> q;
multiset<long long> _inq;
long long getInqueue() {
  if (_inq.empty()) return 1e9;
  return *_inq.begin();
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> p;
  long long mn = 1e9;
  for (long long i = (0); i <= (n - 1); i++) {
    cin >> arr[i];
    pq.push({arr[i], i, 0});
    mn = min(mn, arr[i]);
  }
  pq.push({mn, -1, 1});
  set<long long> st;
  while (!pq.empty()) {
    auto [time, id, type] = pq.top();
    pq.pop();
    if (type == 0) {
      if (getInqueue() > id) {
        q.push(id);
        _inq.insert(id);
      } else
        st.insert(id);
    } else {
      if (id != -1) {
        assert(q.front() == id);
        q.pop();
        _inq.erase(id);
      }
      while (!st.empty()) {
        if (getInqueue() > *st.begin()) {
          q.push(*st.begin());
          _inq.insert(*st.begin());
          st.erase(st.begin());
        } else
          break;
      }
      if (q.empty()) {
        if (!pq.empty()) pq.push({pq.top().time, -1, 1});
      } else {
        long long u = q.front();
        ans[u] = max(time, arr[u]) + p;
        pq.push({time + p, u, 1});
      }
    }
  }
  for (long long i = (0); i <= (n - 1); i++) cout << ans[i] << ' ';
  cout << '\n';
}
