#include <bits/stdc++.h>
using namespace std;
const long long N = 100000;
long long n, m;
pair<long long, long long> a[N + 1];
long long ans[N + 1];
signed main() {
  cin >> n >> m;
  for (long long i = 1; i <= n; i++) cin >> a[i].first, a[i].second = i;
  sort(a + 1, a + n + 1);
  long long now = 0;
  while (now < n) {
    deque<long long> q;
    priority_queue<long long, vector<long long>, greater<long long> > s;
    q.push_back(a[++now].second);
    long long nowt = a[now].first;
    while (true) {
      long long x = q.front();
      ans[x] = nowt += m;
      while (now < n && a[now + 1].first <= nowt)
        a[++now].second < q.back() ? q.push_back(a[now].second)
                                   : s.push(a[now].second);
      q.pop_front();
      if (q.empty())
        if (s.empty())
          break;
        else
          q.push_back(s.top()), s.pop();
    }
  }
  for (long long i = 1; i <= n; i++) cout << ans[i] << " ";
  return 0;
}
