#include <bits/stdc++.h>
long long gi() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (!isdigit(ch)) f ^= ch == '-', ch = getchar();
  while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
  return f ? x : -x;
}
long long t[100010], s[100010], ans[100010];
std::set<int> st, inq;
std::queue<int> que;
int main() {
  int n = gi(), p = gi();
  for (int i = 1; i <= n; ++i) t[i] = gi(), s[i] = i;
  std::sort(s + 1, s + n + 1, [&](int a, int b) { return t[a] < t[b]; });
  long long nt = 0, j = 1, f = 0, del = 0;
  while (1) {
    long long _ = t[s[j]];
    while (j <= n && t[s[j]] <= f && t[s[j]] == _) st.insert(s[j]), ++j;
    if (st.empty()) {
      if (j > n && que.empty())
        break;
      else if (j <= n) {
        f = nt = t[s[j]];
        continue;
      }
    }
    if (!st.empty() && (inq.empty() || *st.begin() < *inq.begin()))
      que.push(*st.begin()), inq.insert(*st.begin()), st.erase(st.begin());
    if ((j > n || t[s[j]] > f)) {
      if (del) inq.erase(del);
      if (que.size()) {
        nt = f;
        ans[que.front()] = nt + p;
        del = que.front();
        que.pop();
        f = nt + p;
      }
    }
  }
  for (int i = 1; i <= n; ++i) printf("%lld ", ans[i]);
  return 0;
}
