#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, p, i, x, t;
  cin >> n >> p;
  vector<pair<long long, long long>> vec, vec2;
  for (i = 0; i < n; i++) {
    cin >> x;
    vec.push_back(make_pair(x, i));
  }
  sort(vec.begin(), vec.end());
  set<pair<long long, long long>> st;
  i = 0;
  t = 0;
  while ((st.size() > 0) or i < vec.size()) {
    if (st.size() == 0) {
      st.insert(make_pair(vec[i].second, vec[i].first));
      t = vec[i].first;
      i++;
    }
    auto itr = st.begin();
    vec2.push_back(make_pair(itr->first, t + p));
    x = itr->first;
    st.erase(st.begin());
    t = t + p;
    while (i < vec.size() and vec[i].first <= t) {
      if (vec[i].second > x)
        st.insert(make_pair(vec[i].second, vec[i].first));
      else {
        vec2.push_back(make_pair(vec[i].second, t + p));
        t = t + p;
        x = vec[i].second;
      }
      i++;
    }
  }
  sort(vec2.begin(), vec2.end());
  for (auto i : vec2) cout << i.second << " ";
  return 0;
}
