#include <bits/stdc++.h>
using namespace std;
const long long inf = (long long)2e9;
const long long md = 1000000007;
long long dx[] = {1, -1, 0, 0}, dy[] = {0, 0, 1, -1};
long long power(long long a, long long p) {
  long long ans = 1;
  while (p) {
    if (p & 1) ans *= a;
    p /= 2;
    a *= a;
    ans %= md;
    a %= md;
  }
  return ans;
}
long long mdinv(long long a) { return power(a, md - 2); }
struct RSQ {
  long long n;
  vector<long long> st;
  RSQ(long long l) {
    n = l;
    st.assign(4 * n, 0);
  }
  void inc(long long first, long long val) { inc(1, 0, n - 1, first, val); }
  void inc(long long i, long long l, long long r, long long first,
           long long val) {
    if (first < l || r < first) return;
    if (l == r) {
      st[i] += val;
      return;
    }
    long long m = (l + r) / 2;
    inc(i * 2, l, m, first, val);
    inc(i * 2 + 1, m + 1, r, first, val);
    st[i] = st[i * 2] + st[i * 2 + 1];
  }
  long long sum(long long first, long long second) {
    return sum(1, 0, n - 1, first, second);
  }
  long long sum(long long i, long long l, long long r, long long first,
                long long second) {
    if (second < l || r < first) return 0;
    if (first <= l && r <= second) return st[i];
    long long m = (l + r) / 2;
    return sum(i * 2, l, m, first, second) +
           sum(i * 2 + 1, m + 1, r, first, second);
  }
  long long kth(long long k) { return kthElement_Helper(1, 0, n - 1, k); }
  long long kthElement_Helper(long long i, long long l, long long r,
                              long long k) {
    if (l == r) return l;
    if (st[i * 2] >= k) return kthElement_Helper(i * 2, l, (l + r) / 2, k);
    return kthElement_Helper(i * 2 + 1, (l + r) / 2 + 1, r, k - st[i * 2]);
  }
};
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, w;
  cin >> n >> w;
  vector<long long> v(n);
  for (long long i = 0; i < (long long)n; i++) cin >> v[i];
  vector<long long> fin(n);
  RSQ seats(n);
  for (long long i = 0; i < (long long)n; i++) seats.inc(i, 1);
  set<pair<long long, pair<long long, long long>>> pq;
  for (long long i = 0; i < (long long)n; i++) {
    pq.insert({v[i], {0, i}});
  }
  long long queTim = 0;
  set<long long> wt;
  while (!pq.empty()) {
    auto p = *pq.begin();
    pq.erase(pq.begin());
    if (p.second.first == 0) {
      long long ind = p.second.second;
      wt.insert(ind);
    } else if (p.second.first == 1) {
      long long ind = p.second.second;
      seats.inc(ind, 1);
    }
    while (wt.size() != 0) {
      long long f = *wt.begin();
      if (seats.sum(0, f) == f + 1) {
        seats.inc(f, -1);
        fin[f] = max(queTim + w, p.first + w);
        queTim = fin[f];
        pq.insert({fin[f], {1, f}});
        wt.erase(wt.begin());
      } else
        break;
    }
  }
  for (long long i : fin) cout << i << " ";
}
