#include using namespace std; #define rep(i,n) for(int i = 0; i < (n);i++) #define sz(x) int(x.size()) typedef long long ll; typedef long double ld; typedef pair P; typedef pair PL; constexpr int INF = 2e9; int main() { int n, d; cin >> n >> d; vector a(n, 0); rep(i,n - 1) cin >> a[i + 1]; for (int i = 1; i < n; i++) { int l = a[i] - a[i - 1]; if (l >= d) continue; a[i] = a[i - 1] + d; } for (int i = 0; i < n; i++) { cout << a[i]; if (i < n - 1) cout << " "; } cout << endl; return 0; }