using System;
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] unos = Console.ReadLine().Split();
            int n = Convert.ToInt32(unos[0]);
            int k = Convert.ToInt32(unos[1]);
            int x = Convert.ToInt32(unos[2]);
            string[] brojevi = Console.ReadLine().Split();
            int[]p= new int[brojevi.Length];
            int[] a = new int[n-k+1];
            int c = 1;
            for (int i = 0; i < n; i++)
            {
                p[i] = Convert.ToInt32(brojevi[i]);
            }

            for (int i = 0; i+k-1 < n; i++)
            {
                for (int j = i; j < i+3; j++)
                {
                    a[i] = a[i] + c * p[j];
                    if (p[j]<0)
                        c++;
                }
                c = 1;
            }
            foreach (int br in a)
                Console.Write(br+" ");
        }
    }
}