#include <bits/stdc++.h>
using namespace std;
const long long N = 1e6 + 100;
const long long M = 200;
const long long mod = 1e9 + 7;
const long long MOD = 998244353;
const long long P = 1336;
const long double eps = 0.000000001;
const long long inf = 1e9 + 7;
mt19937 gen(chrono::high_resolution_clock::now().time_since_epoch().count());
long long ans[N], tin[N];
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  srand(time(0));
  long long n, add;
  cin >> n >> add;
  vector<pair<long long, long long> > a;
  for (long long i = 0; i < n; i++) {
    long long x;
    cin >> x;
    a.push_back({x, i});
    tin[i] = x;
  }
  sort(a.begin(), a.end());
  long long t = -1, no = -1;
  queue<long long> q;
  set<long long> st, w;
  for (long long j = 0; j < n; j++) {
    long long i = a[j].second;
    if (a[j].first <= t) {
      if (st.size() == 0 || min(no, *st.begin()) > i) {
        q.push(i);
        st.insert(i);
      } else
        w.insert(i);
    } else {
      if (no != -1) {
        st.erase(no);
        if (w.size() && (st.size() == 0 || *w.begin() < *st.begin())) {
          long long c = *w.begin();
          q.push(c);
          st.insert(c);
          w.erase(c);
        }
      }
      if (!q.empty()) {
        no = q.front();
        q.pop();
        t = max(t, tin[no]) + add;
        ans[no] = t;
        j--;
      } else {
        no = i;
        st.insert(i);
        t = max(t, tin[i]) + add;
        ans[i] = t;
      }
    }
  }
  st.erase(no);
  while (!q.empty()) {
    no = q.front();
    q.pop();
    st.erase(no);
    t = max(t, tin[no]) + add;
    ans[no] = t;
    if (w.size() && (st.size() == 0 || *w.begin() < *st.begin())) {
      long long c = *w.begin();
      q.push(c);
      st.insert(c);
      w.erase(c);
    }
  }
  for (auto to : w) {
    no = to;
    t = max(t, tin[no]) + add;
    ans[no] = t;
  }
  for (long long i = 0; i < n; i++) {
    cout << ans[i] << " ";
  }
}
