#include<bits/stdc++.h>
using namespace std;
int main(){
    int n,k,x;
    cin>>n>>k>>x;
    x--;
    int niz[n+2];
    niz[0] = 0;
    bool jel = true;
    for(int i=1;i<=n;i++){
        cin>>niz[i];
        if(niz[i]<0) jel = false;
    }
    long long p[n+1];
    p[0] = 0;
    for(int i=1;i<=n;i++){
        p[i] = p[i-1] + niz[i];
    }
    if(jel){
        long long suma = 0;
        for(int i=1;i<=x;i++){
            suma += i*niz[i];
        }
        for(int i=x+1;i<=k;i++){
            suma += (x+1)*niz[i];
        }
        cout<<suma<<" ";
        for(int i=2;i<=n-k+1;i++){
            suma = suma + (x+1)*(i+k-1) - p[i+x-1] + p[i-2];
            cout<<suma<<" ";
        }
    }
}