#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, f = 1, c = getchar();
  for (; !isdigit(c); c = getchar())
    if (c == '-') f ^= 1;
  for (; isdigit(c); c = getchar()) x = x * 10 + c - '0';
  return f ? x : -x;
}
int n;
long long p;
vector<pair<int, int> > v;
set<int> can;
int que[100005], lb, rb;
long long ans[100005];
set<int> inque;
int main() {
  n = read(), p = read();
  for (int i = 0; i < (int)(n); ++i) v.push_back(make_pair(read(), i));
  sort(v.begin(), v.end());
  int j = 0;
  long long T = 0;
  int lst = -1;
  while (j < n || !can.empty() || lb < rb) {
    while (j < n && v[j].first <= T) {
      can.insert(v[j++].second);
      if (!can.empty() && (j == n || v[j].first != v[j - 1].first)) {
        set<int>::iterator it = inque.lower_bound(*can.begin());
        if (it == inque.begin()) {
          que[rb++] = *can.begin();
          inque.insert(*can.begin());
          can.erase(can.begin());
        }
      }
    }
    if (~lst) inque.erase(lst);
    if (lb == rb && can.empty()) {
      T = v[j].first;
      while (j < n && v[j].first <= T) can.insert(v[j++].second);
    }
    if (!can.empty()) {
      set<int>::iterator it = inque.lower_bound(*can.begin());
      if (it == inque.begin()) {
        que[rb++] = *can.begin();
        inque.insert(*can.begin());
        can.erase(can.begin());
      }
    }
    int i = que[lb++];
    ans[i] = T += p;
    lst = i;
  }
  for (int i = 0; i < (int)(n); ++i) printf("%lld ", ans[i]);
  return 0;
}
