#include <bits/stdc++.h>
using namespace std;
using namespace std;
template <typename T, typename U>
std::istream &operator>>(std::istream &i, pair<T, U> &p) {
  i >> p.first >> p.second;
  return i;
}
template <typename T>
std::istream &operator>>(std::istream &i, vector<T> &t) {
  for (auto &v : t) {
    i >> v;
  }
  return i;
}
template <typename T, typename U>
std::ostream &operator<<(std::ostream &o, const pair<T, U> &p) {
  o << p.first << ' ' << p.second;
  return o;
}
template <typename T>
std::ostream &operator<<(std::ostream &o, const vector<T> &t) {
  if (t.empty()) o << '\n';
  for (size_t i = 0; i < t.size(); ++i) {
    o << t[i] << " \n"[i == t.size() - 1];
  }
  return o;
}
template <typename T>
using minheap = priority_queue<T, vector<T>, greater<T>>;
template <typename T>
using maxheap = priority_queue<T, vector<T>, less<T>>;
template <typename T>
bool in(T a, T b, T c) {
  return a <= b && b < c;
}
unsigned int logceil(int x) {
  return (unsigned int)(8 * sizeof(int) - __builtin_clz(x));
}
namespace std {
template <typename T, typename U>
struct hash<pair<T, U>> {
  hash<T> t;
  hash<U> u;
  size_t operator()(const pair<T, U> &p) const {
    return t(p.x) ^ (u(p.y) << 7);
  }
};
}  // namespace std
template <typename T>
T gcd(T a, T b) {
  if (a < b) swap(a, b);
  return b ? gcd(b, a % b) : a;
}
template <typename T>
class vector2 : public vector<vector<T>> {
 public:
  vector2() {}
  vector2(size_t a, size_t b, T t = T())
      : vector<vector<T>>(a, vector<T>(b, t)) {}
};
template <typename T>
class vector3 : public vector<vector2<T>> {
 public:
  vector3() {}
  vector3(size_t a, size_t b, size_t c, T t = T())
      : vector<vector2<T>>(a, vector2<T>(b, c, t)) {}
};
template <typename T>
class vector4 : public vector<vector3<T>> {
 public:
  vector4() {}
  vector4(size_t a, size_t b, size_t c, size_t d, T t = T())
      : vector<vector3<T>>(a, vector3<T>(b, c, d, t)) {}
};
template <typename T>
class vector5 : public vector<vector4<T>> {
 public:
  vector5() {}
  vector5(size_t a, size_t b, size_t c, size_t d, size_t e, T t = T())
      : vector<vector4<T>>(a, vector4<T>(b, c, d, e, t)) {}
};
void fastIO() { ios::sync_with_stdio(false); }
template <typename ValueType, typename TagType,
          void (*combineTag)(TagType &, TagType),
          void (*applyTag)(ValueType &, TagType, unsigned int),
          ValueType (*combineValues)(ValueType, ValueType)>
struct LSegTree {
  LSegTree(const vector<ValueType> &data, const ValueType &_nullValue,
           const TagType &_nullTag)
      : n(1 << logceil(data.size())),
        nullValue(_nullValue),
        nullTag(_nullTag),
        T(2 * n, {_nullValue, _nullTag}) {
    for (int i = 0; i < data.size(); ++i) T[n + i].first = data[i];
    for (unsigned int i = n - 1; i > 0; i--)
      T[i].first = combineValues(T[i << 1].first, T[i << 1 | 1].first);
  }
  LSegTree(unsigned int size, const ValueType &_nullValue,
           const TagType &_nullTag)
      : n(1 << logceil(size)),
        nullValue(_nullValue),
        nullTag(_nullTag),
        T(2 * n, {_nullValue, _nullTag}) {
    for (unsigned int i = n - 1; i > 0; i--)
      T[i].first = combineValues(T[i << 1].first, T[i << 1 | 1].first);
  }
  inline void put(unsigned int x, const TagType &v) { put(x, x, v); }
  inline void put(unsigned int from, unsigned int to, TagType v) {
    putInner(from, to, v, 1, n);
  }
  inline ValueType operator[](pair<unsigned int, unsigned int> x) {
    return get(x.first, x.second);
  }
  inline ValueType operator[](unsigned int x) { return get(x, x); }
  inline ValueType get(unsigned int x) { return get(x, x); }
  inline ValueType get(unsigned int from, unsigned int to) {
    return getInner(from, to, 1, n);
  }
  void putInner(unsigned int from, unsigned int to, TagType v, unsigned int i,
                unsigned int s) {
    vector<int> Q;
    unsigned int r = i;
    while (true) {
      if (from == 0 && to == s - 1) {
        applyTag(T[i].first, v, s);
        combineTag(T[i].second, v);
        break;
      }
      pushTagDown(i, s);
      s >>= 1;
      i <<= 1;
      if (from & s) {
        from ^= s;
        to ^= s;
        i ^= 1;
      } else if (to & s) {
        putInner(0, to ^ s, v, i | 1, s);
        to = s - 1;
      }
    }
    while (i != r) {
      T[i >> 1].first = combineValues(T[i].first, T[i ^ 1].first);
      i >>= 1;
    }
  }
  ValueType getInner(unsigned int from, unsigned int to, unsigned int i,
                     unsigned int s) {
    while (true) {
      if (from == 0 && to == s - 1) {
        return T[i].first;
      }
      pushTagDown(i, s);
      s >>= 1;
      i <<= 1;
      if (to & s) {
        to ^= s;
        if (from & s) {
          from ^= s;
          i |= 1;
        } else {
          auto a = getInner(from, s - 1, i, s), b = getInner(0, to, i | 1, s);
          return combineValues(a, b);
        }
      }
    }
  }
  template <typename Pred>
  unsigned int longestSuffix(unsigned int x, Pred pred) {
    ValueType value = nullValue;
    return longestSuffixInner2(x, 1, 0, n, value, pred);
  }
  template <typename Pred>
  unsigned int longestSuffixInner(unsigned int i, unsigned int l,
                                  unsigned int r, ValueType &curValue,
                                  Pred pred) {
    if (l + 1 != r) pushTagDown(i, r - l);
    ValueType nextValue = combineValues(T[i].first, curValue);
    if (pred(nextValue)) {
      curValue = nextValue;
      return l;
    }
    if (l + 1 == r) return r;
    unsigned int s =
        longestSuffixInner(i << 1 | 1, (l + r) / 2, r, curValue, pred);
    if (s == (l + r) / 2) {
      return longestSuffixInner(i << 1, l, (l + r) / 2, curValue, pred);
    } else {
      return s;
    }
  }
  template <typename Pred>
  unsigned int longestSuffixInner2(unsigned int x, unsigned int i,
                                   unsigned int l, unsigned int r,
                                   ValueType &curValue, Pred pred) {
    if (x >= r - 1) {
      return longestSuffixInner(i, l, r, curValue, pred);
    }
    if (l + 1 == r) {
      ValueType nextValue = combineValues(T[i].first, curValue);
      if (pred(nextValue)) {
        curValue = nextValue;
        return l;
      } else
        return r;
    }
    pushTagDown(i, r - l);
    unsigned int m = (l + r) / 2;
    if (x < m) {
      return longestSuffixInner2(x, i << 1, l, (l + r) / 2, curValue, pred);
    } else {
      unsigned int s =
          longestSuffixInner2(x, i << 1 | 1, (l + r) / 2, r, curValue, pred);
      if (s == (l + r) / 2) {
        return longestSuffixInner(i << 1, l, (l + r) / 2, curValue, pred);
      } else {
        return s;
      }
    }
  }
  template <typename Pred>
  unsigned int longestPrefix(unsigned int x, Pred pred) {
    ValueType value = nullValue;
    return longestPrefixInner2(x, 1, 0, n, value, pred) - 1;
  }
  template <typename Pred>
  unsigned int longestPrefixInner(unsigned int i, unsigned int l,
                                  unsigned int r, ValueType &curValue,
                                  Pred pred) {
    if (l + 1 != r) pushTagDown(i, r - l);
    ValueType nextValue = combineValues(T[i].first, curValue);
    if (pred(nextValue)) {
      curValue = nextValue;
      return r;
    }
    if (l + 1 == r) return l;
    unsigned int s = longestPrefixInner(i << 1, l, (l + r) / 2, curValue, pred);
    return s == (l + r) / 2
               ? longestPrefixInner(i << 1 | 1, (l + r) / 2, r, curValue, pred)
               : s;
  }
  template <typename Pred>
  unsigned int longestPrefixInner2(unsigned int x, unsigned int i,
                                   unsigned int l, unsigned int r,
                                   ValueType &curValue, Pred pred) {
    if (x <= l) {
      return longestPrefixInner(i, l, r, curValue, pred);
    }
    if (l + 1 == r) {
      ValueType nextValue = combineValues(T[i].first, curValue);
      if (pred(nextValue)) {
        curValue = nextValue;
        return r;
      } else
        return l;
    }
    pushTagDown(i, r - l);
    unsigned int m = (l + r) / 2;
    if (x >= m) {
      return longestPrefixInner2(x, i << 1 | 1, m, r, curValue, pred);
    } else {
      unsigned int s = longestPrefixInner2(x, i << 1, l, m, curValue, pred);
      return s == m ? longestPrefixInner(i << 1 | 1, m, r, curValue, pred) : s;
    }
  }
  void pushTagDown(unsigned int i, unsigned int s) {
    applyTag(T[i << 1].first, T[i].second, s >> 1);
    applyTag(T[i << 1 | 1].first, T[i].second, s >> 1);
    combineTag(T[i << 1].second, T[i].second);
    combineTag(T[i << 1 | 1].second, T[i].second);
    T[i].second = nullTag;
  }
  unsigned int n;
  ValueType nullValue;
  TagType nullTag;
  vector<pair<ValueType, TagType>> T;
};
template <typename F>
void LAddOp(F &a, F b) {
  a += b;
}
template <typename F>
void LAddOp2(F &a, F b, unsigned int) {
  a += b;
}
template <typename F>
F LMinOp(F a, F b) {
  return std::min(a, b);
}
template <typename F>
F LMaxOp(F a, F b) {
  return std::max(a, b);
}
template <typename T>
T LSumOp(T a, T b) {
  return a + b;
}
template <typename T>
void LAssignOp(T &a, T b) {
  if (b != 0) a = b;
}
template <typename T>
void LAssignOp2(T &a, T b, unsigned int) {
  if (b != 0) a = b;
}
template <typename T>
void LAssignMultOp(T &a, T b, unsigned int s) {
  if (b != 0) a = b * s;
}
template <typename T>
using LAddMaxTree = LSegTree<T, T, LAddOp<T>, LAddOp2<T>, LMaxOp<T>>;
template <typename T>
using LAddMinTree = LSegTree<T, T, LAddOp<T>, LAddOp2<T>, LMinOp<T>>;
template <typename T>
using AssignSumTree = LSegTree<T, T, LAssignOp<T>, LAssignMultOp<T>, LSumOp<T>>;
template <typename T>
using AssignMaxTree = LSegTree<T, T, LAssignOp<T>, LAssignOp2<T>, LMaxOp<T>>;
void applyTag(long long &val, long long tag, unsigned int) {
  val = max(val, tag);
}
void combineTag(long long &t1, long long t2) { t1 = max(t1, t2); }
using SegTree =
    LSegTree<long long, long long, combineTag, applyTag, LMinOp<long long>>;
const int MAXN = 100100;
long long ans[MAXN];
class CQueueInTheTrain {
 public:
  void solve(std::istream &in, std::ostream &out) {
    fastIO();
    int n, p;
    in >> n >> p;
    vector<long long> t(n);
    in >> t;
    auto tree = SegTree(t, 5e18, 0);
    long long cm = 0;
    for (int i = 0; i < n; ++i) {
      auto curv = tree.get(0, n - 1);
      auto pos =
          tree.longestPrefix(0, [curv](long long x) { return x > curv; }) + 1;
      curv = max(curv, cm);
      cm = curv + p;
      ans[pos] = cm;
      tree.put(pos, n - 1, cm);
      tree.put(pos, 5e18);
    }
    for (int i = 0; i < n; ++i) {
      out << ans[i] << " ";
    }
    out << endl;
  }
};
int main() {
  CQueueInTheTrain solver;
  std::istream &in(std::cin);
  std::ostream &out(std::cout);
  solver.solve(in, out);
  cerr << 1.0 * clock() / CLOCKS_PER_SEC << endl;
  return 0;
}
