/// ! 704/ 10^, )!3!+B?!B!/[!]
#include <bits/stdc++.h>

using namespace std;

#define ll long long
#define vi vector<int>
#define vl vector<ll>
#define pi pair<int, int>
#define pl pair<ll, ll>
#define vp vector<pi>
#define vpl vector<pl>

#define l first
#define r second

#define pb push_back
#define ub upper_bound
#define lb lower_bound
#define pf push_front

#define FOR(i, a, b) for(ll i = (a); i < (b); i++)
#define ROF(i,a,b) for(ll i = (b) - 1; i >= (a); --i)
#define trav(a, x) for(auto& a : x)

#define nl "\n"

void solve(){
    ll n, k, x;
    cin >> n >> k >> x;
    vl a(n), pref(n);
    FOR(i, 0, n){
        cin >> a[i];
        if(i) pref[i] = pref[i - 1] + a[i];
        else pref[0] = a[0];
    }
    vl res;
    ll t, s;
    FOR(i, 0, n - k + 1){
        t = 0, s = 1;
        FOR(j, i, i + k){
            t += a[i] * min(x, s);
            s++;
            if(s >= x){
                t += (pref[i + k - 1] - pref[j]) * x;
                break;
            }
        }
        res.pb(t);
    }
    trav(i, res){
        cout << i << " ";
    }
}

int main(){
    cin.tie(0);cout.tie(0);ios_base::sync_with_stdio(false);
    int t = 1;
    // cin >> t;
    while(t--){
        solve();
    }
}