using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    internal class Program
    {
        static void Main(string[] args)
        {
            string[] unos=Console.ReadLine().Split(' ');
            int n = int.Parse(unos[0]);
            int krajnjiKoeficient = int.Parse(unos[2]);
            int k = int.Parse(unos[1]);
            int[] p = new int[n];
            unos= Console.ReadLine().Split(' ');
            for (int i = 0; i < n; i++)
            {
                p[i] = int.Parse(unos[i]);
            }

            for (int i = 0; i <= n - k; i++)
            {
                int maxAura = 0;
                int tempK = krajnjiKoeficient;
                for (int j = i + k - 1; j >= i; j--)
                {
                    if (p[j] < 0 && tempK > 1)
                    {
                        tempK--;
                    }
                    maxAura += tempK * p[j];
                }
                Console.Write($"{maxAura} ");
            }
        }
    }
}