using System;
using System.Linq;

class Program
{
    static void Main()
    {
        string[] ss = Console.ReadLine().Split();
        int n = int.Parse(ss[0]);
        int k = int.Parse(ss[1]);
        int x = int.Parse(ss[2]);

        ss = Console.ReadLine().Split();
        int[] p = new int[n];
        for (int i = 0; i < n; i++) 
        {
            p[i] = int.Parse(ss[i]);
        }

        long[] maxAuras = new long[n - k + 1];

        for (int ind = 0; ind <= n - k; ind++)
        {
            long[,] dp = new long[k + 1, x + 2];

            for (int i = 0; i <= k; i++)
                for (int j = 0; j <= x + 1; j++)
                    dp[i, j] = long.MinValue;

            dp[0, 1] = 0;

            for (int i = 0; i < k; i++)
            {
                int currentValue = p[ind + i];

                for (int c = 1; c <= x; c++)
                {
                    if (dp[i, c] != long.MinValue)
                    {
                        dp[i + 1, c] = Math.Max(dp[i + 1, c], dp[i, c] + c * currentValue);

                        if (c + 1 <= x)
                        {
                            dp[i + 1, c + 1] = Math.Max(dp[i + 1, c + 1], dp[i, c] + c * currentValue);
                        }
                    }
                }

            }

            maxAuras[ind] = dp[k, x];
        }

        foreach (int aura in maxAuras)
            Console.Write(aura + " ");
    }
}