#include <bits/stdc++.h>
using namespace std;
template <class T>
using max_pq = priority_queue<T>;
template <class T>
using min_pq = priority_queue<T, vector<T>, greater<T>>;
vector<string> split(const string& s, char c) {
  vector<string> v;
  stringstream second(s);
  string x;
  while (getline(second, x, c)) v.emplace_back(x);
  return move(v);
}
template <typename T, typename... Args>
inline string arrStr(T arr, long long n) {
  stringstream s;
  s << "[";
  for (long long i = 0; i < n - 1; i++) s << arr[i] << ",";
  if (n > 0) s << arr[n - 1];
  s << "]";
  return s.str();
}
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cerr << name << " : " << arg1 << "\n";
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long n, p, i, x, t;
  cin >> n >> p;
  vector<pair<long long, long long>> v, v2;
  for (i = 0; i < n; i++) {
    cin >> x;
    v.push_back(make_pair(x, i));
  }
  sort(v.begin(), v.end());
  set<pair<long long, long long>> st;
  i = 0;
  t = 0;
  while ((st.size() > 0) or i < v.size()) {
    if (st.size() == 0) {
      st.insert(make_pair(v[i].second, v[i].first));
      t = v[i].first;
      i++;
    }
    auto itr = st.begin();
    v2.push_back(make_pair(itr->first, t + p));
    x = itr->first;
    st.erase(st.begin());
    t = t + p;
    while (i < v.size() and v[i].first <= t) {
      if (v[i].second > x)
        st.insert(make_pair(v[i].second, v[i].first));
      else {
        v2.push_back(make_pair(v[i].second, t + p));
        t = t + p;
        x = v[i].second;
      }
      i++;
    }
  }
  sort(v2.begin(), v2.end());
  for (auto i : v2) cout << i.second << " ";
  return 0;
}
