#include <bits/stdc++.h>
using namespace std;
#define int long long
const int maxn = 1e5 + 5;
inline int read()
{
    int w = 0, f = 1;
    char ch = getchar();
    while (ch < '0' or ch > '9')
    {
        if (ch == '-')
            f = -f;
        ch = getchar();
    }
    while (ch >= '0' and ch <= '9')
        w = w * 10 + ch - '0', ch = getchar();
    return w * f;
}
int L[maxn], R[maxn], A[maxn], N, M, K;
bool check(int limit)
{
    for (int i = 1; i <= K; i++)
        L[i] = ((A[i] * M - limit + N - 1) / N), R[i] = ((A[i] * M + limit) / N);
    for (int i = 1; i <= K; i++)
        L[i] = max(L[i], 0ll);
    for (int i = 1; i <= K; i++)
        if (L[i] > R[i])
            return 0;
    int lsum = 0, rsum = 0;
    for (int i = 1; i <= K; i++)
        lsum += L[i], rsum += R[i];
    if (lsum <= M and rsum >= M)
        return 1;
    return 0;
}
signed main()
{
    scanf("%lld%lld%lld", &K, &N, &M);
    for (int i = 1; i <= K; i++)
        scanf("%lld", &A[i]);
    int l = 0, r = M * N;
    while (l <= r)
    {
        int mid = (l + r) >> 1;
        if (check(mid))
            r = mid - 1;
        else
            l = mid + 1;
    }
    check(l);
    int lsum = 0;
    for (int i = 1; i <= K; i++)
        lsum += L[i];
    int res = M - lsum;
    for (int i = 1; i <= K; i++)
    {
        printf("%lld ", min(L[i] + res, R[i]));
        res -= min(L[i] + res, R[i]) - L[i];
    }
    return 0;
}
#include <bits/stdc++.h>
using namespace std;
#define int long long
void read (int &x) {
    char ch = getchar(); int f = 0; x = 0;
    while (!isdigit(ch)) { if (ch == '-') f = 1; ch = getchar(); }
    while (isdigit(ch)) x = x * 10 + ch - 48, ch = getchar(); if (f) x = -x;
} const int N = 2020, mod = 1e9 + 7;
int n, m, a[N];
int qpow (int x, int y) {
    int t = 1;
    while (y) {
        if (y & 1) t = t * x % mod;
        x = x * x % mod, y >>= 1;
    } return t;
}
int C (int x, int y) {
    int s = 1, p = 1; if (x < y) return 0;
    for (int i = 1; i <= y; ++i)
        s = s * (x - i + 1) % mod;
    for (int i = 1; i <= y; ++i)
        p = p * i % mod;
    return s * qpow (p, mod - 2) % mod;
}
signed main() {
    read (n), read (m); int s = 0;
    for (int i = 1; i <= n; ++i) read (a[i]);
    for (int i = 1; i <= n; ++i) s += a[i];
    printf ("%lld\n", C (m + n, n + s));
}
