internal class Program
{
    static void Main(string[] args)
    {
        string[] unos = Console.ReadLine().Split(' ');
        int n = int.Parse(unos[0]);
        int k = int.Parse(unos[1]);
        int krajnjiKoeficient = int.Parse(unos[2]);

        int[] p = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();

        const long NEG = long.MinValue;

        for (int i = 0; i <= n - k; i++)
        {
            int[] tempP = new int[k];
            for (int j = 0; j < k; j++)
            {
                tempP[j] = p[i + j];
            }

            long[] dp = new long[krajnjiKoeficient + 2];

            for (int j = 0; j <= krajnjiKoeficient; j++)
                dp[j] = NEG;

            dp[1] = 0;

            for (int j = 0; j < k; j++)
            {
                long[] noviDp = new long[krajnjiKoeficient + 2];
                for (int c = 0; c <= krajnjiKoeficient; c++)
                    noviDp[c] = NEG;

                for (int c = 1; c <= krajnjiKoeficient; c++)
                {
                    if (dp[c] == NEG) continue;
                    noviDp[c] = Math.Max(
                        noviDp[c],
                        dp[c] + (long)c * tempP[j]
                    );
                    if (c + 1 <= krajnjiKoeficient)
                    {
                        noviDp[c + 1] = Math.Max(
                            noviDp[c + 1],
                            dp[c] + (long)c * tempP[j]
                        );
                    }
                }

                dp = noviDp;
            }

            Console.Write(dp[krajnjiKoeficient] + " ");
        }
    }
}