#include<bits/stdc++.h>
#define ll long long
using namespace std;
struct doublet{
    ll a;
    ll b;
};
bool dSort(doublet a, doublet b)
{
    return a.a>b.a;
}

int main()
{
    ll n,k,cmax;
    cin>>n>>k>>cmax;
    vector<ll> b;

    for(ll i=0;i<n;i++)
    {
        ll l;
        cin>>l;
        b.push_back(l);
    }




    for(ll i=0;i<n-k+1;i++)
    {
        vector<ll> ind;
        vector<doublet> pr;
        ll aura=0,c=1;

        ll p=0;
        ll maks=0;
        for(ll j=1;j<k;j++)
        {
            maks+=b[i+j];
        }
        for(ll j=0;j<k;j++)
        {
            p+=b[i+j];
            doublet a;
            a.a= maks-p;
            a.b= j;
            pr.push_back(a);
        }
        sort(pr.begin(),pr.end(),dSort);
        for(ll j=0;j<cmax-1;j++)
        {
            ind.push_back(pr[j].b);
        }
        for(ll j=0;j<k;j++)
        {
            aura+=b[i+j]*c;
            for(ll z=0;z<ind.size();z++)
            {
                if(j==ind[z])
                {
                    c++;
                }
            }
        }
        cout<<aura<<" ";


    }
}