#include <bits/stdc++.h>
using namespace std;
const int maxn = 4e5 + 10;
const int maxm = 2e5 + 10;
const int mod = 1e9 + 7;
const long long linf = 0x3f3f3f3f3f3f3f3f;
const int inf = 0x3f3f3f3f;
const double eps = 1e-6;
int LobN;
inline int lowbit(int x) { return (x & (-x)); }
void add(long long *c, int x, long long v) {
  while (x <= LobN) c[x] += v, x += lowbit(x);
}
long long que(long long *c, int x) {
  long long res = 0;
  while (x) res += c[x], x -= lowbit(x);
  return res;
}
template <typename S, typename T>
inline bool Min(S &a, const T &b) {
  return a > b ? a = b, true : false;
}
template <typename S, typename T>
inline bool Max(S &a, const T &b) {
  return a < b ? a = b, true : false;
}
template <typename S, typename T>
inline void Adm(S &a, const T &b) {
  a = (a + b) % mod;
  if (a < 0) a += mod;
}
template <typename S, typename T>
inline void Mum(S &a, const T &b) {
  a = 1LL * a * b % mod;
}
template <typename T>
inline T Gcd(T a, T b) {
  while (b) {
    T t = b;
    b = a % b;
    a = t;
  }
  return a;
}
template <typename T>
inline int BitCnt(T x) {
  int cnt = 0;
  while (x) ++cnt, x &= x - 1;
  return cnt;
}
template <typename T>
inline bool IsPri(T x) {
  if (x < 2) return false;
  for (T i = 2; i * i <= x; ++i)
    if (x % i == 0) return false;
  return true;
}
inline long long qpow(long long a, long long n) {
  long long t = 1;
  while (n) {
    if (n & 1) t = t * a % mod;
    a = a * a % mod, n >>= 1;
  }
  return t % mod;
}
priority_queue<pair<long long, int>, vector<pair<long long, int> >,
               greater<pair<long long, int> > >
    q;
priority_queue<int, vector<int>, greater<int> > qq;
queue<int> Q;
set<int> st;
int a[maxn];
long long d[maxn];
int main() {
  int n, p;
  scanf("%d%d", &n, &p);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    q.push({a[i], i});
  }
  long long T = 0;
  while (!q.empty() || !qq.empty() || !Q.empty()) {
    if (Q.empty() && qq.empty()) T = max(T, q.top().first);
    while (!q.empty() && q.top().first <= T + p) {
      int x = q.top().first;
      int y = q.top().second;
      q.pop();
      if (st.empty()) {
        st.insert(y);
        Q.push(y);
      } else {
        if (*st.begin() > y) {
          st.insert(y);
          Q.push(y);
        } else {
          qq.push(y);
        }
      }
    }
    if (!Q.empty()) {
      T += p;
      int x = Q.front();
      Q.pop();
      d[x] = T;
      st.erase(x);
    }
    if (!qq.empty() && (st.empty() || *st.begin() > qq.top())) {
      Q.push(qq.top());
      st.insert(qq.top());
      qq.pop();
    }
  }
  for (int i = 1; i <= n; i++) printf("%lld ", d[i]);
  return 0;
}
