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

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

            int[] p = new int[n];

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

            for (int i = 0; i <= n - k; i++)
            {
                int zb = 0;
                int c = 1;
                for (int j = i; j < k + i ; j++)
                {
                    zb += c * p[j];
                    if (zb < 0 && x > c)
                    {
                        c++;
                    }
                }

                Console.Write(zb + " ");
            }
        }
    }
}