#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:102400000,102400000")
using namespace std;
#pragma optimize("-O3")
inline long long read() {
  long long x = 0;
  int f = 0;
  char ch = getchar();
  while (ch < '0' || ch > '9') f |= (ch == '-'), ch = getchar();
  while (ch >= '0' && ch <= '9')
    x = (x << 3) + (x << 1) + ch - '0', ch = getchar();
  return x = f ? -x : x;
}
inline void write(long long x, bool f) {
  if (x == 0) {
    putchar('0');
    if (f)
      putchar('\n');
    else
      putchar(' ');
    return;
  }
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  static char s[23];
  int l = 0;
  while (x != 0) s[l++] = x % 10 + 48, x /= 10;
  while (l) putchar(s[--l]);
  if (f)
    putchar('\n');
  else
    putchar(' ');
}
int lowbit(int x) { return x & (-x); }
template <class T>
T big(const T &a1, const T &a2) {
  return a1 > a2 ? a1 : a2;
}
template <class T>
T sml(const T &a1, const T &a2) {
  return a1 < a2 ? a1 : a2;
}
template <typename T, typename... R>
T big(const T &f, const R &...r) {
  return big(f, big(r...));
}
template <typename T, typename... R>
T sml(const T &f, const R &...r) {
  return sml(f, sml(r...));
}
void debug_out() { cerr << '\n'; }
template <typename T, typename... R>
void debug_out(const T &f, const R &...r) {
  cerr << f << " ";
  debug_out(r...);
}
const long long INFLL = 0x3f3f3f3f3f3f3f3fLL;
const int HMOD[] = {1000000009, 1004535809};
const long long BASE[] = {1572872831, 1971536491};
const int mod = 998244353;
const int MOD = 1e9 + 7;
const int INF = 0x3f3f3f3f;
long long ksm(long long a, long long b) {
  long long res = 1;
  for (; b; b >>= 1, a = a * a % mod)
    if (b & 1) res = res * a % mod;
  return res;
}
const int MXN = 1e5 + 7;
const int MXE = 2e5 + 7;
int n, m;
long long ans[MXN];
priority_queue<pair<long long, int> > Q;
priority_queue<int> rdy, tim;
set<int> out;
queue<int> Q2;
int main() {
  n = read(), m = read();
  for (int i = 1, x; i <= n; ++i) {
    x = read();
    tim.push(-x);
    Q.push(make_pair(-x, -i));
  }
  long long now = -Q.top().first;
  for (int T = 1; T <= n; ++T) {
    now = big(now, (long long)-tim.top());
    tim.pop();
    while (!Q.empty() && -Q.top().first <= now) {
      rdy.push(Q.top().second);
      Q.pop();
    }
    while (!rdy.empty() && (out.empty() || -rdy.top() < *out.begin())) {
      Q2.push(rdy.top());
      out.insert(-rdy.top());
      rdy.pop();
    }
    now += m;
    ans[-Q2.front()] = now;
    while (!Q.empty() && -Q.top().first < now) {
      if (-Q.top().second < *out.begin()) {
        Q2.push(Q.top().second);
        out.insert(-Q.top().second);
      } else
        rdy.push(Q.top().second);
      Q.pop();
    }
    out.erase(-Q2.front());
    Q2.pop();
  }
  for (int i = 1; i <= n; ++i) printf("%lld ", ans[i]);
  return 0;
}
