#include <bits/stdc++.h>
using namespace std;
struct ppl {
  long long id;
  long long t;
  inline bool operator<(const ppl &rhs) const { return t < rhs.t; }
} p[111111];
queue<long long> q;
queue<pair<long long, long long> > qq;
priority_queue<long long, vector<long long>, greater<long long> > pq, event;
long long top = 1;
long long tt[111111];
long long vis[111111];
long long ans[111111];
long long BIT[111111];
long long n;
inline void change(long long pos, long long d) {
  for (long long x = pos; x <= n; x += x & -x) {
    BIT[x] += d;
  }
}
inline long long query(long long pos) {
  long long ret = 0;
  for (long long x = pos; x; x -= x & -x) {
    ret += BIT[x];
  }
  return ret;
}
signed main() {
  long long t;
  scanf("%lld%lld", &n, &t);
  for (long long i = 1; i <= n; i++) {
    scanf("%lld", &p[i].t);
    tt[i] = p[i].t;
    event.push(p[i].t);
    p[i].id = i;
  }
  sort(p + 1, p + n + 1);
  long long last = 0;
  while (!event.empty()) {
    long long ok = 1;
    long long T = event.top();
    event.pop();
    while (ok) {
      ok = 0;
      while (top <= n && p[top].t <= T) {
        pq.push(p[top++].id);
      }
      while (!qq.empty() && qq.front().first <= T) {
        change(qq.front().second, -1);
        qq.pop();
      }
      if (!pq.empty() && query(pq.top()) == 0) {
        ok = 1;
        long long x = pq.top();
        pq.pop();
        change(x, 1);
        q.push(x);
      }
      if (!q.empty() && max(last, tt[q.front()]) <= T) {
        ok = 1;
        long long x = q.front();
        q.pop();
        last = max(last, tt[x]);
        last += t;
        event.push(last);
        qq.push(make_pair(last, x));
        ans[x] = last;
      }
    }
  }
  for (long long i = 1; i <= n; i++) {
    printf("%lld ", ans[i]);
  }
  return 0;
}
