#include <cstdio>
#include <algorithm>
static const int N = (int)3e5;
int n, s;
int a[N];
int p[N];
long long sum;
bool comp(const int &x, const int &y) {
return a[x] < a[y];
}
int main() {
freopen("input.txt", "rt", stdin);
freopen("output.txt", "wt", stdout);
scanf("%d%d", &n, &s);
for (int i = 0; i < n; i++) {
scanf("%d", &a[i]);
p[i] = i, sum += a[i];
}
std::sort(p, p + n, comp);
for (int i = 0; i < n; i++) {
int m = (sum + n - i - 1) / (n - i);
if (a[p[i]] + s >= m) {
for (int j = i; j < n; j++)
a[p[j]] = m;
break;
}
sum -= a[p[i]], a[p[i]] = a[p[i]] + s;
}
for (int i = 0; i < n; i++)
printf("%d ", a[i]);
return 0;
}
I2luY2x1ZGUgPGNzdGRpbz4KI2luY2x1ZGUgPGFsZ29yaXRobT4KCnN0YXRpYyBjb25zdCBpbnQgTiA9IChpbnQpM2U1OwoKaW50IG4sIHM7CmludCBhW05dOwppbnQgcFtOXTsKbG9uZyBsb25nIHN1bTsKCmJvb2wgY29tcChjb25zdCBpbnQgJngsIGNvbnN0IGludCAmeSkgewogICAgcmV0dXJuIGFbeF0gPCBhW3ldOwp9CgppbnQgbWFpbigpIHsKICAgIGZyZW9wZW4oImlucHV0LnR4dCIsICJydCIsIHN0ZGluKTsKICAgIGZyZW9wZW4oIm91dHB1dC50eHQiLCAid3QiLCBzdGRvdXQpOwoKICAgIHNjYW5mKCIlZCVkIiwgJm4sICZzKTsKCiAgICBmb3IgKGludCBpID0gMDsgaSA8IG47IGkrKykgewogICAgICAgIHNjYW5mKCIlZCIsICZhW2ldKTsKICAgICAgICBwW2ldID0gaSwgc3VtICs9IGFbaV07CiAgICB9CgogICAgc3RkOjpzb3J0KHAsIHAgKyBuLCBjb21wKTsKCiAgICBmb3IgKGludCBpID0gMDsgaSA8IG47IGkrKykgewogICAgICAgIGludCBtID0gKHN1bSArIG4gLSBpIC0gMSkgLyAobiAtIGkpOwoKICAgICAgICBpZiAoYVtwW2ldXSArIHMgPj0gbSkgewogICAgICAgICAgICBmb3IgKGludCBqID0gaTsgaiA8IG47IGorKykKICAgICAgICAgICAgICAgIGFbcFtqXV0gPSBtOwoKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgfQoKICAgICAgICBzdW0gLT0gYVtwW2ldXSwgYVtwW2ldXSA9IGFbcFtpXV0gKyBzOwogICAgfQoKICAgIGZvciAoaW50IGkgPSAwOyBpIDwgbjsgaSsrKQogICAgICAgIHByaW50ZigiJWQgIiwgYVtpXSk7CgogICAgcmV0dXJuIDA7Cn0K