#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n, k, x;
    cin >>n >> k >> x;
    vector<int> p(n+1);
    vector<vector<int>> v(n+1, vector<int>(x+1,1));
    for (int i=1; i<= n; i++)
    {
        cin >> p[i];
    }
    for (int i=1; i<= n; i++)
    {
        for (int j=1; j<= x; j++)
        {
            v[i][j]=p[i]*j;
        }
    }
    for (int l=1; l<=n-k+1; l++)
    {
         int c=1;
         vector<int>dp(k);
         dp[0]=v[l][1];
         for (int i=1; i<k; i++)
         {
             if(c==x)
                dp[i]=dp[i-1]+v[l+i][c];
             else if (x-c-1==k-i)
             {
                 c++;
                 dp[i]=dp[i-1]+v[i+l][c];
             }
             else if(dp[i-1]+v[i+l][c+1] > dp[i-1]+v[i+l][c])
             {
                c++;
                dp[i]=dp[i-1]+v[i+l][c];
             }
             else
                dp[i]=dp[i-1]+v[i+l][c];
         }
         cout << dp[k-1] << endl;
    }
}