#include <bits/stdc++.h>

using namespace std;

//sus const long long INF=(1<<50);

int main()
{///promeni int->long long
    int n,k,x;
    cin >> n >> k >> x;
    vector<int> p(n);
    for(int i=0; i<n; i++)cin >> p[i];
    for(int i=0; i<n-k+1; i++){
        vector<vector<int>> dp(x+1,vector<int>(k,0));// dali mogu da koristim prethodno izracunatre vrednosti??
        ///vector<int> dpp(x+1,0);

        //int i=0;
        for(int j=0; j<k; j++){dp[1][j]=p[j+i];
        }
        //dp[1][0]=p[i];
        ///for(int j=0; j<k; j++){dp[0]=0;dp[1]=p[j+i];}
        for(int c=1; c<=x; c++){
            for(int j=1; j<k; j++){
                //if(p[i+j]>=0)
                //if(c==1)dp[1][j]=p[i+j];
                    dp[c][j]=max(dp[c-1][j-1]+(c)*p[i+j],dp[c][j-1]+c*p[i+j]);
                //else dp[c][j]=dp[c-1][j-1]+(c-1)*p[i+j];
                cout << "<" << c << ":" << j+1 << "=" << dp[c][j] << "> ";
            }
            cout << endl;
        }
        int best=dp[x][k-1];
    cout << best << endl;
    }
    return 0;
}