#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long x = 0, f = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = (x << 3) + (x << 1) + (c ^ 48);
    c = getchar();
  }
  return f == 1 ? x : -x;
}
inline void print(long long x) {
  if (x < 0) putchar('-'), x = ~x + 1;
  if (x >= 10) print(x / 10);
  putchar((x % 10) | 48);
}
long long n, p;
long long ans[100010];
long long tm[100010];
priority_queue<pair<long long, long long> > Q1;
priority_queue<long long> Q2;
set<long long> st;
signed main() {
  n = read(), p = read();
  for (long long i = 1; i <= n; ++i)
    tm[i] = read(), Q1.push(make_pair(-tm[i], -i));
  long long nowt = 0, et = 0;
  while (Q1.size()) {
    pair<long long, long long> u = Q1.top();
    Q1.pop();
    nowt = -u.first;
    if (u.second < -n) {
      st.erase(-u.second - n);
    } else
      Q2.push(u.second);
    while (!Q2.empty() && (st.empty() || -Q2.top() < *st.begin())) {
      long long u = -Q2.top();
      Q2.pop();
      st.insert(u);
      et = max(et, nowt) + p;
      Q1.push(make_pair(-et, -n - u));
      ans[u] = et;
    }
  }
  for (long long i = 1; i <= n; ++i) printf("%lld ", ans[i]);
}
