#include <bits/stdc++.h>
using namespace std;
inline int read() {
  char ch = getchar();
  int x = 0, f = 1;
  while (ch < '0' || ch > '9') f = ch == '-' ? -1 : 1, ch = getchar();
  while (ch >= '0' && ch <= '9') x = x * 10 + ch - '0', ch = getchar();
  return x * f;
}
const int MAXN = 100010;
struct node {
  long long time;
  int type, id;
};
bool operator<(const node &a, const node &b) {
  if (a.time != b.time)
    return a.time > b.time;
  else
    return a.id > b.id;
}
priority_queue<node> event;
set<int> need, leave;
queue<int> q;
long long res[MAXN];
int main(int argc, char *argv[]) {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n = read();
  long long p = read();
  for (int i = (1); i <= (n); i += (1)) event.push(node{read(), 0, i});
  long long now = 0;
  int cnt = 0;
  bool use = false;
  while (cnt < n) {
    now = event.top().time;
    while (!event.empty() && event.top().time == now) {
      node cur = event.top();
      event.pop();
      if (cur.type == 0)
        need.insert(cur.id);
      else
        res[cur.id] = now, use = false, leave.erase(cur.id), cnt++;
    }
    if (!need.empty()) {
      int nd = *(need.begin());
      if (leave.empty())
        q.push(nd), leave.insert(nd), need.erase(nd);
      else {
        auto it = leave.upper_bound(nd);
        if (it == leave.begin()) q.push(nd), leave.insert(nd), need.erase(nd);
      }
    }
    if (!use && !q.empty()) {
      int nd = q.front();
      event.push(node{now + p, 1, nd});
      q.pop();
      use = true;
    }
  }
  for (int i = (1); i <= (n); i += (1)) printf("%lld ", res[i]);
  putchar('\n');
  return 0;
}
