#include <iostream>
#include <bits/stdc++.h>
using namespace std;
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    int64_t aura=0;
    int n,k,pom,x;
    int c=1;
    cin>>n>>k>>x;
    vector<int>brojevi;
    int provera=1;
    for(int i = 0;i<n;i++)
    {
        cin>>pom;
        brojevi.push_back(pom);
    }
        for(int i = 0;i<n-k+1;i++)
        {
            aura+=brojevi[i];
            if(x!=1)
                c++,x--;
            for(int j =i+1;j<i+k;j++){
                aura+=brojevi[j]*c;
                if(x!=1)
                {
                    c++;
                    x--;
                }
            }
            cout<<aura<<" ";
            aura=0;
        }
}