#include <iostream>
#include <bits/stdc++.h>
#include <algorithm>
#include <cmath>
using namespace std;

int main()
{
    int aura,c;
    aura = 0;
    c = 1;
    int n,k,x, maks,pm;
    long ukupno;
    int a[n], b[n], t[n],m[n];
    cin>>n>>k>>x;
    for(int i=0;i<n;i++){
        cin>>a[i];
        m[i] = 1;
    }
    b[n-1] = 0;
    for(int i=n-2; i>=0; i--){
        b[i] = a[i+1] + b[i+1];
    }
    /*for(int i=0;i<n;i++){
        cout << b[i] << endl;
    }*/
    for(int i=0; i<n-k+1;i++){
        if(i!= n-k){
            for(int j=i; j<i+k;j++){
                t[j] = b[j] - b[n-k-1];
                //cout<< a[j]<<" ";
                //cout << t[j] << " ";
            }
        }
        c=1;
        ukupno = 0;
        for(int h = 0; h<x-1;h++){
            maks = -1000000001;
            pm = 0;
            for(int j=i; j<i+k;j++){
                m[j] = 1;
                if(t[j]>maks){
                    maks = t[j];
                    pm = j;
                }
            }
            for(int j=pm+1; j<i+k;j++){ //proveri za off by one posle
                m[j]++;
                //cout<<m[j]<<" " << a[j]<< " " << pm << endl;
            }
        }
        for(int j=i; j<i+k;j++){
             //cout<<ukupno<< " " << i <<" "<<j<<endl;
             ukupno += a[j]*m[j];
        }
        cout<<ukupno <<endl;
    }
    //cout << "Hello world!" << endl;
    return 0;
}