#include <bits/stdc++.h>
using namespace std;
template <class S, class T>
pair<S, T> operator+(const pair<S, T> &s, const pair<S, T> &t) {
  return pair<S, T>(s.first + t.first, s.second + t.second);
}
template <class S, class T>
pair<S, T> operator-(const pair<S, T> &s, const pair<S, T> &t) {
  return pair<S, T>(s.first - t.first, s.second - t.second);
}
template <class S, class T>
ostream &operator<<(ostream &os, pair<S, T> p) {
  os << "(" << p.first << ", " << p.second << ")";
  return os;
}
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
const long long inf = 1000000001;
const long long INF = (long long)1e18 + 1;
const long long MOD = 1000000007;
const double pi = 3.14159265358979323846;
int dx[4] = {-1, 0, 1, 0}, dy[4] = {0, 1, 0, -1};
int dx2[8] = {1, 1, 0, -1, -1, -1, 0, 1}, dy2[8] = {0, 1, 1, 1, 0, -1, -1, -1};
struct SegNode {
  pair<long long, long long> v;
  SegNode(pair<long long, long long> v) : v(v) {}
  SegNode operator*(const SegNode &r) const { return (v < r.v ? *this : r); }
} e(pair<long long, long long>(INF, INF));
struct SegmentTree {
  long long sz;
  vector<SegNode> seg;
  SegmentTree(long long n) {
    sz = 1;
    while (sz < n) sz <<= 1;
    seg.assign(2 * sz - 1, e);
  }
  void update(long long k, const SegNode &x) {
    k += sz - 1;
    seg[k] = x;
    while (k > 0) {
      k = (k - 1) >> 1;
      seg[k] = seg[2 * k + 1] * seg[2 * k + 2];
    }
  }
  SegNode query(long long a, long long b, long long k, long long l,
                long long r) {
    if (a >= r || b <= l) return (e);
    if (a <= l && r <= b) return (seg[k]);
    return (query(a, b, 2 * k + 1, l, (l + r) >> 1) *
            query(a, b, 2 * k + 2, (l + r) >> 1, r));
  }
  SegNode query(long long a, long long b) { return (query(a, b, 0, 0, sz)); }
  long long find(long long a, long long b, long long x, long long k,
                 long long l, long long r) {
    if (seg[k].v.first > x || r <= a || b <= l) return (-1);
    if (k >= sz - 1) return (k - (sz - 1));
    long long lv = find(a, b, x, 2 * k + 1, l, (l + r) >> 1);
    if (lv != -1) return (lv);
    return (find(a, b, x, 2 * k + 2, (l + r) >> 1, r));
  }
  long long find(long long a, long long b, long long x) {
    return (find(a, b, x, 0, 0, sz));
  }
};
struct dice {
  mt19937 mt;
  dice() : mt(chrono::steady_clock::now().time_since_epoch().count()) {}
  long long operator()(long long x) { return this->operator()(0, x); }
  long long operator()(long long x, long long y) {
    uniform_int_distribution<long long> dist(x, y - 1);
    return dist(mt);
  }
  vector<long long> operator()(long long n, long long x, long long y) {
    vector<long long> res(n);
    for (long long i = 0; i < n; i++) res[i] = this->operator()(x, y);
    return res;
  }
} rnd;
vector<long long> guchoku(long long n, long long p, vector<long long> t) {
  vector<long long> state(n);
  long long time = 0;
  vector<long long> ans(n);
  long long cnt = 0;
  deque<pair<long long, long long> > qu;
  while (cnt < n) {
    if (qu.size() > 0 and qu.front().second == time) {
      pair<long long, long long> temp = qu.front();
      qu.pop_front();
      ans[temp.first] = time;
      state[temp.first] = 2;
      cnt++;
    }
    for (long long i = 0; i < (n); i++) {
      if (t[i] <= time) {
        bool flag = true;
        for (long long j = 0; j < i; j++) {
          if (state[j] == 1) {
            flag = false;
            break;
          }
        }
        if (flag) {
          state[i] = 1;
          if (qu.size() == 0) {
            qu.push_back(pair<long long, long long>(i, time + p));
          } else {
            qu.push_back(pair<long long, long long>(i, qu.back().second + p));
          }
          t[i] = INF;
          break;
        }
      }
    }
    time++;
  }
  return ans;
}
signed main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  ;
  long long n, p;
  cin >> n >> p;
  vector<long long> t(n);
  for (long long i = 0; i < (n); i++) {
    cin >> t[i];
  }
  vector<pair<long long, long long> > temp(n);
  for (long long i = 0; i < (n); i++) {
    temp[i].first = t[i];
    temp[i].second = i;
  }
  SegmentTree seg(n + 1);
  for (long long i = 0; i < (n); i++) {
    seg.update(i, SegNode(pair<long long, long long>(t[i], i)));
  }
  seg.update(n, SegNode(pair<long long, long long>(INF, INF)));
  vector<long long> ans(n);
  long long pre = n;
  long long now = 0;
  for (long long _ = 0; _ < (n); _++) {
    pair<long long, long long> mi = seg.query(0, pre).v;
    long long nex;
    if (mi.first <= now) {
      nex = mi.second;
      now = now + p;
    } else {
      long long mi_idx = seg.find(pre + 1, n, now);
      if (mi_idx != -1) {
        nex = mi_idx;
        now = now + p;
      } else {
        pair<long long, long long> mi = seg.query(0, n).v;
        nex = mi.second;
        now = mi.first + p;
      }
    }
    ans[nex] = now;
    seg.update(nex, SegNode(pair<long long, long long>(INF, INF)));
    pre = nex;
  }
  for (long long i = 0; i < (n); i++) {
    cout << ans[i] << " ";
  }
  cout << endl;
}
