class Program
{
    static void Main(string[] args)
    {
        string[] input1 = Console.ReadLine().Split();
        int p = int.Parse(input1[0]);
        int k = int.Parse(input1[1]);
        int x = int.Parse(input1[2]);
        int[] b = new int[p];
        string[] input2 = Console.ReadLine().Split();
        for (int i=0;i<p;i++)
        {
            b[i] = int.Parse(input2[i]);
        }
        for(int i=0;i<k;i++)
        {
            int c = 1;
            int a = 0;
            int o = i;
            int u = 0;
            while(u<k)
            {
                if (u!=k-1 && b[o] < b[o+1])
                {
                    a += c * b[o];
                    c++;
                }
                else
                {
                    a += c * b[o];
                }
                o++;
                u++;
            }
            Console.WriteLine(a);
        }
    }
}