using System;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] s1 = Console.ReadLine().Split(' ');
            long n = long.Parse(s1[0]);
            long p = long.Parse(s1[1]);
            long k = long.Parse(s1[2]);
            long[] a = new long[n];
            long[] b = new long[n - p + 1];
            string[] s2 = Console.ReadLine().Split(' ');
            for(long i = 0; i <= n-1; i++)
            {
                a[i] = long.Parse(s2[i]);
            }
            for(long i = 0; i <= n - p; i++)
            {
                long c = 1;
                long br = 0;
                while (c < k)
                {
                    for (long j = i; j <= p + i - 1; j++)
                    {
                        br += a[j] * c;
                        if (a[j] < 0) c++;
                    }
                }
                b[i] = br;
            }
            for (long i = 0; i <= n - p; i++)
            {
                Console.Write(b[i] + " ");
            }
        }
    }
}