#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e5 + 5;
template <typename T>
void chkmax(T &x, T y) {
  x = max(x, y);
}
template <typename T>
void chkmin(T &x, T y) {
  x = min(x, y);
}
template <typename T>
void read(T &x) {
  x = 0;
  int f = 1;
  char c = getchar();
  for (; !isdigit(c); c = getchar())
    if (c == '-') f = -f;
  for (; isdigit(c); c = getchar()) x = x * 10 + c - '0';
  x *= f;
}
template <typename T>
void write(T x) {
  if (x < 0) x = -x, putchar('-');
  if (x > 9) write(x / 10);
  putchar(x % 10 + '0');
}
template <typename T>
void writeln(T x) {
  write(x);
  puts("");
}
struct BinaryIndexTree {
  int n, a[MAXN];
  void init(int x) {
    n = x;
    memset(a, 0, sizeof(a));
  }
  void modify(int x, int d) {
    for (int i = x; i <= n; i += i & -i) a[i] += d;
  }
  int query(int x) {
    int ans = 0;
    for (int i = x; i >= 1; i -= i & -i) ans += a[i];
    return ans;
  }
  int query(int l, int r) {
    int ans = 0;
    for (int i = r; i >= 1; i -= i & -i) ans += a[i];
    for (int i = l - 1; i >= 1; i -= i & -i) ans -= a[i];
    return ans;
  }
} BIT;
int n, home[MAXN];
pair<long long, int> a[MAXN];
long long p, timer, ans[MAXN];
deque<int> q;
set<int> s;
int main() {
  read(n), read(p);
  for (int i = 1; i <= n; i++) read(a[i].first), a[i].second = i;
  sort(a + 1, a + n + 1);
  for (int i = 1; i <= n; i++) home[a[i].second] = i;
  timer = 0, BIT.init(n);
  int i = 1;
  while (i <= n || !q.empty()) {
    if (i <= n && (q.empty() || a[i].first <= timer + p)) {
      s.insert(a[i].second);
      if (!s.empty() && BIT.query(*s.begin()) == 0) {
        q.push_back(*s.begin());
        BIT.modify(*s.begin(), 1);
        s.erase(s.begin());
        if (q.size() == 1) timer = a[i].first;
      }
      i++;
    } else {
      timer += p;
      ans[q.front()] = timer;
      BIT.modify(q.front(), -1), q.pop_front();
      if (!s.empty() && BIT.query(*s.begin()) == 0) {
        q.push_back(*s.begin());
        BIT.modify(*s.begin(), 1);
        s.erase(s.begin());
      }
    }
  }
  for (int i = 1; i <= n; i++) printf("%lld ", ans[i]);
  return 0;
}
