namespace ConsoleApp2
{
    internal class Program
    {
        static void Main(string[] args)
        {
            string[] unos = Console.ReadLine().Split();
            long n = Convert.ToInt64(unos[0]);
            long k = Convert.ToInt64(unos[1]);
            long x = Convert.ToInt64(unos[2]);
            string[] brojevi = Console.ReadLine().Split();
            long[]p= new long[brojevi.Length];
            long[] a = new long[n-k+1];
            long c = 1;
            for (long i = 0; i < n; i++)
            {
                p[i] = Convert.ToInt64(brojevi[i]);
            }
            for (long i = 0; i+k-1 < n; i++)
            {
                for (long j = i; j < i+k; j++)
                {
                    a[i] = a[i] + c * p[j];
                    if (p[j] < 0)
                        if (c < x)
                            c++;
                }
                c = 1;
            }
            foreach (long br in a)
                Console.Write(br+" ");
        }
    }
}