#include <bits/stdc++.h>
using namespace std;
void debug_out() { cerr << endl; }
template <class T>
ostream& prnt(ostream& out, T v) {
  out << v.size() << '\n';
  for (auto e : v) out << e << ' ';
  return out;
}
template <class T>
ostream& operator<<(ostream& out, vector<T> v) {
  return prnt(out, v);
}
template <class T>
ostream& operator<<(ostream& out, set<T> v) {
  return prnt(out, v);
}
template <class T1, class T2>
ostream& operator<<(ostream& out, map<T1, T2> v) {
  return prnt(out, v);
}
template <class T1, class T2>
ostream& operator<<(ostream& out, pair<T1, T2> p) {
  return out << '(' << p.first << ' ' << p.second << ')';
}
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cerr << " " << H;
  debug_out(T...);
}
long long n, v[100005];
long long d, lst = 0, tim;
set<long long> gone;
template <typename T = int>
struct heap {
  vector<T> val;
  static bool comp(T A, T B) {
    if (A.first == B.first) return A.second > B.second;
    return A.first > B.first;
  }
  T top() { return val[0]; }
  void clear() { val.clear(); }
  int size() { return val.size(); }
  void push(T x) {
    val.push_back(x);
    push_heap(val.begin(), val.end(), comp);
  }
  T pop() {
    pop_heap(val.begin(), val.end(), comp);
    T aux = val.back();
    val.pop_back();
    return aux;
  }
};
heap<pair<long long, long long> > sta;
template <typename T = int>
struct heap2 {
  vector<T> val;
  static bool comp(T A, T B) { return A > B; }
  T top() { return val[0]; }
  void clear() { val.clear(); }
  int size() { return val.size(); }
  void push(T x) {
    val.push_back(x);
    push_heap(val.begin(), val.end(), comp);
  }
  T pop() {
    pop_heap(val.begin(), val.end(), comp);
    T aux = val.back();
    val.pop_back();
    return aux;
  }
};
heap2<long long> vsp;
queue<long long> q;
long long ans[100005];
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> d;
  for (int i = 1; i <= n; i++) {
    cin >> v[i];
    sta.push({v[i], i});
  }
  while (!sta.val.empty() || !q.empty() || !vsp.val.empty()) {
    if (q.empty() && vsp.val.empty() && !sta.val.empty() &&
        lst < sta.top().first) {
      lst = max(lst, (long long)sta.top().first);
    }
    while (!sta.val.empty() && lst >= sta.top().first) {
      vsp.push(sta.pop().second);
    }
    while (!vsp.val.empty() && (gone.empty() || *gone.begin() > vsp.top())) {
      gone.insert(vsp.top());
      q.push(vsp.top());
      vsp.pop();
    }
    if (!q.empty()) {
      lst += d;
      while (!sta.val.empty() && lst >= sta.top().first) {
        vsp.push(sta.pop().second);
        if (!vsp.val.empty() && (gone.empty() || *gone.begin() > vsp.top())) {
          gone.insert(vsp.top());
          q.push(vsp.top());
          vsp.pop();
        }
      }
      ans[q.front()] = lst;
      gone.erase(q.front());
      q.pop();
    }
  }
  for (int i = 1; i <= n; i++) cout << ans[i] << ' ';
  cout << '\n';
  return 0;
}
