namespace ConsoleApp2
{
    internal class Program
    {
        public static void UnosPodataka(out int n, out int k, out int x, out int[] a)
        {
            int[] input = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse);
            n = input[0];
            k = input[1];
            x = input[2];

            a = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse);
        }
        static void Main(string[] args)
        {
            UnosPodataka(out int n, out int k, out int x, out int[] p);

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

                Console.WriteLine(a + " ");
            }
        }
    }
}